Made code work with extra warnings, added consts, wrote STYLE guide