Added weight api and other small changes