Cleaned the code up a bit and added methods for integration