Resolved todo and function definition clean up.