Reorganized code and added .pro file