First commit. Incomplete, but working to my needs.