style: code cleanup

Closes #671