clean up code, update README for issue #4