Changed structure of files, added more APIs