added rest APIS and restructured a bit!