Fix syntax error
Spinner and autoload now works for parent id.

Also remove unused code.