Small fixes / cleanup

- Remove useless JS function
- Use CONSTANT for constant properties

Change-Id: Ie921852250f3f7df718d998e7b3d160dc7db6a15
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>