Fixed few bugs and features