Removed obsolete code
Fixed multiple issues
Fixed multiple issues