Added ability to close with status, and also override some functions