Cleanup and work with non-prototype functions