extract subroutines in library
whitespace fixes
add perl based gamepad support (needs SDL for perl)