Loosely following pygame tutorial