Fixed share command functionality and unwanted 'OK' outputs. Removed some code duplicities and typos.