Clean up and fix portfolio javascript.