Moved the lib to a simple obj pattern