Initial commit, horrible code written at wee hours. Don't hate.