Refactory of tests and realocating libs