First rough commit.
Will clean up and streamline later.