removed warning.
formalization, cleanup.
aiming for more consistency with original code.