clean code and add libraries and queries to index file.