Initial code commit

TODO: Tests, proper comments, ...