general minor cleanup with better documented explainations