basic main file
some simples fixes (mainly to make the project compile and be runnable)