Move implement sources to lib directory