Improved code quality
	got rid of globals
	check return codes
	structure
	pedantic checking
proper option parsing
setting frequency is optional
improve help
improve gain setting
clean Makefile / make it compile
small readme fix