Restructure for PyTest

Restructured and moved around code for PyTest and PyTest-Qt compatibility.
Added requirements.txt