Merge from iXce, Truly fix #584, refactor a bit command parsing