First commit - v1.0
Little error handling and naming cleanup.