Fixed bugs and added few features