Fixed many design details and bugs