Finally.. committing asynchronous calls to database. Took looong time because of unexpected bugs
Transferring index2.html in view to index.php in main folder. Index file needs to be in the main folder.