Refactored to very basic library + sample structure