cleanup
revamp how applies are done; should be easier to maintain