Updated model functions with JOIN statement when selecting from the db
Updated home page to hide controls if no study is found.