Clean up and added a few cool things from Damian Conway