clean up the twisties, revise code