Added version
Mostly code improvements