Reversal mechanisms and metastable states in magnetic nanoelements