toughen code standards and fix the code