Tidying up js code (fixed formatting) and started using the asset id as
its key in the assets array.