Debugged, added a few smartmove functions.