Cleaning up js scripts on client side, added check for accessionNumber, ...

...and other stuff