Changed code to remove dependencies.