made getStyleValues more efficient

Now only accesses DOM once