fixing several stupid errors, improving layouts