Don't cast on return
Cleanup variable names, documentation