Added errorhandling + documented css