Added suspend and resume, other minor changes