amending starred functionality and tidying up after jshint check