Improve structure and update dependencies