Fixed build errors

Updated make file and build structure