BROKEN style and consistency fixes
Fixed bug, passing tests again, style and consistency fixes