Restructed the library a bit