refactored code to make use of allegro5. need to rework gfx and init methods