Completed Problem 48, it does still need some work though, as it takes almost 12 mins to execute :P