Major refacator for pics