Implemented most of the methods
Minor cleanup