Added --version + other misc fixes