Implmnt push,pop_mode/more base rules/some cleanup