Cleaned up the code a bit per pep8. Added OptionParser to handle clargs. Added __main__ invocation.
Added a README