Intermediate commit of unfinished code for backup

Still not fit for any purpose.