Fixed a few bugs - reduced file size slightly.