cleaned up formatting issues and uncommented flash lock