Code cleanup, standardization