Major Refactor - Better api & library layout