Designed layout; added basic functions