Added a few features and some polishing