Re-order source code structure, add src and test