fix convention and logic

For me, it takes about 2 hours to finish this task. Installing composer and running unit test are the most time consuming tasks.