Refactored platform logic in preparation for random level design