[FULL REWRITE] Switch to annotation based implementation.
registerPackage should not throw exception for short application code.