Cleaned up player movement code a bit