Added README, LICENSE, and refactored some API