Minor redesign and number of fixes