Reduced JS complexity by getting rid of self and this references