Corrected 'category' references

Moved javascript to file.