Added some more features. Refactoring needs to be done. Also need to add more tests