Proper organization and some tests