Revamp with some minor corrections