Cleared some function and putted them in the corresponding objects. Close #33.