Adding new architechture for making it a library