Basic stuffs.

Added some basic structs and methods, enough for simple usage. Lacks tests and comments.