Removed superflous ifs, and redundancy.
Merge pull request #4 from mhitza/refactor-qt-approach

Removed superflous ifs, and redundancy.