Refactoring the types of variables and params

It's highly recommended to use the more generic type as possible as parameters (mainly public methods) and variables. This PR addresses this, and makes the variable status a volatile so that any change to it can be made readily available without JVM register caching.