Make application pip installable. Fix PEP8 issues.