Update Makefile and fix minor bugs.
Check frame size when building the reponse.
Change few names and remove unused includes.