Going on to v1.0

An almost total refactoring from the initial version