Fixed bug (actions collection userID was allways NaN)and some minor changes in code