Bugs fixed
Removed dev code