Extracted monster class and functions to its own file