Cleaning up code for simplicity and consistency. Updating readme with examples.