format readme to use markdown, and replace readme.txt
reformat all source code to conform to style conventions

PEP-8 was used as a guide, primarily. This means spaces after commas in
most places, as well as around most arithmetic. The text width was also
adjusted to be 80 in most places. Many TODO comments were also added in
places where there seem to be unused functions or other unnecessary or
unclear code.