Update libraries, directory structure, and logic