Removed bugs arose due to merging code

Merged UI with other code