Initial commit
Second commit: refactored a few things