re-org lib directory structure