just some minor tweaks, commenting, debugging, etc