fixed many bugs & tweaks