implemented master, simplified get* functions, modified file layout