Added help function and flags support