Reworked and minor updates.