Some refactoring. Added publishing settings. New versioning scheme.