Code cleaned up a bit more