First initial commit.
Might need some pruning as I blatantly reused some code from another project.