Added UI support
Fixed all the bugs