optional classes param to list classes

untested code, sorry
fixed list-classes match
pass nil as count instead of array length
made sure classes was always an array

had to convert the setting into an array instead of a hash so classes is
always an array
Merge pull request #3 from Faek/master

optional parameter for list-classes (untested)