Fixed a few bugs and got initial working version