This method probably can be simplified to 1 line with a regex. Man, I wish I knew regex...