Took the code out of the constructor to try and avoid conflicts.