got rid of numpy references, as they weren't being used. Did a little refactoring as well