remove unused advance
move states to Core module
reduce header dependencies