Rewrote routines, seems to work better now (still defunct, though)