Added new functionality. Fixed Bugs.