Added some crash protections and some placeholders for further development