Huge refactor: moved qmath module into qsimulator

Also made PrettyTable dependency optional