Refactored the project, and moved common library to lib directory.