Fixed the code to the flow of project.
Added updated Sql file.
Merge pull request #3 from narensgh/refactor_half

Refactor half