Working version
Minor formatting tweaks