Minor code style tweaks + remove obsolete func