Changed refresh times to 60 seconds.
SQL and function layout cleanup.