Design improvements and bug fixing