code cleanups and simplifications.
code cleanups and simplifications.

docwhite/appleseed,glebmish/appleseed,docwhite/appleseed,Biart95/appleseed,Aakash1312/appleseed,appleseedhq/appleseed,docwhite/appleseed,luisbarrancos/appleseed,glebmish/appleseed,gospodnetic/appleseed,Aakash1312/appleseed,Biart95/appleseed,gospodnetic/appleseed,pjessesco/appleseed,pjessesco/appleseed,Biart95/appleseed,glebmish/appleseed,aytekaman/appleseed,gospodnetic/appleseed,pjessesco/appleseed,luisbarrancos/appleseed,est77/appleseed,aiivashchenko/appleseed,Biart95/appleseed,aiivashchenko/appleseed,aiivashchenko/appleseed,pjessesco/appleseed,est77/appleseed,luisbarrancos/appleseed,Aakash1312/appleseed,pjessesco/appleseed,glebmish/appleseed,est77/appleseed,est77/appleseed,Biart95/appleseed,aytekaman/appleseed,glebmish/appleseed,appleseedhq/appleseed,appleseedhq/appleseed,appleseedhq/appleseed,docwhite/appleseed,dictoon/appleseed,gospodnetic/appleseed,gospodnetic/appleseed,Vertexwahn/appleseed,Aakash1312/appleseed,Vertexwahn/appleseed,aytekaman/appleseed,Vertexwahn/appleseed,aytekaman/appleseed,aytekaman/appleseed,luisbarrancos/appleseed,est77/appleseed,docwhite/appleseed,appleseedhq/appleseed,aiivashchenko/appleseed,dictoon/appleseed,Aakash1312/appleseed,aiivashchenko/appleseed,dictoon/appleseed,dictoon/appleseed,dictoon/appleseed,luisbarrancos/appleseed,Vertexwahn/appleseed,Vertexwahn/appleseed