refactored more
fixed some minor library issues
fixed the path on client side
fixed compile error