Cleaned up the logic for placing moves somewhat