Splitted into libraries and made makefile