Code cleanup and documentation blocks