split src and lib (issue #6)