Small fixes mostly for readablity and naming (manually merged some parts from Decagon's pull request)