Fixes and all that Jazz

CP what I could out of elkarte#403 did not change the order of params nor separate out the hash line to its own function :lazy: 

Other than that a few fixes here and there as described in the commits