small style updates and code organizing