Fix buggy codes
Layout changed
Some small fixings