Initial code commit

Actually needs to be rewritten with some sort of asynchronous threading
system, ehh.