Removed unnecessary functions creations. Removed code duplications
Updated dist