fixed pieces being mirrored bug

+ a little re-factor

Signed-off-by: Andrew R <andrewreds@gmail.com>