Added version command, bugfixes