reorganize some front-end stuff, also fairly volitile param passing