Restructured tests and lib folder