Moved everything into libraries