reorg into lib directory