Version 0.4

- Added comments
- New coding style (using spaces instead of tabs, aligned)
- Some functions check for valid input