Made some slight API changes for better design.