Major enhancing done. Fixed minor bugs