Code Reviewed and Cleaned prog8051

Tested by running locally, simulating error cases, and pushing programs to the board. Changes were primarily to improve readability/cleanliness of code and to make it comply with the Python PEP 8 style guide.