Updated docstring and header variables
Fixed function names to match PEP conventions
Added on_save functionality, updated docstrings