Cleaned up version targetting and added more comments.