More refactoring and comments - LibFM needs debugging