Refactoring and hierarchy management

Refactored the ugly piece moving code and added a piece movement test
script. Also changed the location of some older python code to clean up
and remove confusion as to what is production code