Fixing bugs and work so far