Added matrix class and transpose method