Changed folder layout & added error handling