Added a few convenience functions and fixed an error which occurred when reading or writing raw frames