fixed a bug with recognizing indented methods, removed unnecessary regex, made image open automatically