Cleaninig up the use of data in javascript...