Some code beauty and removed unneeded stuff