Improved name function
Improved category function
Improved and fixed problems