Validity Check & Layout

Merging validity checking and layouts to repo

FIXED #39