Added functions, removed tables … + more

+ Added setters for properties
- Removed tables as properties
~ Cleaned up code
~ Better parameter checking in functions