code cleanup, properly passing uniform data