General cleanup and preperation for future State Machine introduction