Initial commit. Partially works, but still debugged.