[BUGFIX] Minor code cleanups