Restructure code base (create src/ and lib/)