Refactor repo dir to add lib sources and certs