Cleanup of code and dependencies