Tesla Motors saw a successful second quarter with more Model S sales than expected and even surprised Wall Street with an adjusted profit.

For Q2 2013, Tesla reported a loss of $30.5 million (26 cents a share), which was much narrower than the $105.6 million ($1 a share) loss in the year-ago quarter. The automaker had an adjusted profit of 22 cents, which beat expectations of a non-GAAP loss of 17 cents. In the year-ago quarter, Tesla reported a profit loss of 89 cents.

Revenue jumped to $405.1 million compared to just $26.7 million in the year-ago quarter. Analysts expected a revenue of $383 million for Q2 2013.

Also notable is that Tesla's production rate increased 25 percent to almost 500 vehicles per week (up from 400 previously). Tesla sold 10,500 Model S sedans in the first six months of 2013 and plans to reach a rate of 40,000 annually by late 2014.

For the third quarter, Tesla expects to deliver slightly over 5,000 Model S' and a total of 21,000 worldwide for the whole year.

Tesla shares jumped up to $153 in after-hours trading, which is a 14 percent boost from its Wednesday close at $134.

For Q1 2013, Tesla reported a net income of $11.2 million (a huge increase from an $89.9 million loss in the year-ago quarter). Excluding certain items, Tesla's profit came in at 12 cents a share, which was a boost from a loss of 76 cents a share in Q1 2012. Analysts expected a profit of about 4 cents a share. Revenue also saw a huge year-over-year boost, totaling $562 million (up from $30.2 million in the year-ago quarter).

Tesla has become quite a hero in the auto industry. In May, Tesla repaid its $465 million loan from the U.S. Department of Energy (DOE) nine years earlier than expected from the original 2022 due date.

This was mainly due to its decision to issue more stock the week before. Tesla said it wanted to sell about $830 million in shares, and use $450 million in convertible senior notes (which are due in 2018) along with sales of 2.7 million shares (valued at about $229 million at the time) to pay back its federal loan. This is an especially crucial detail in Tesla's history, considering other plug-in hybrid electric automaker Fisker Automotive (which also received a DOE loan) has failed miserably.

More recently, Tesla has had a few other victories, such as a win in the battle against auto dealers when a North Carolina House committee denied a bill that would block Tesla from being able to sell its vehicles directly to the public.

Tesla has also started showing off new tech that could transform the electric auto industry. In June, Tesla unveiled a convenient alternative to waiting for a Model S to charge -- battery swapping. The idea behind battery swapping is to easily open the car chassis to pull the battery out and replace it with a fully charged one. This saves the driver from having to wait for their battery to charge before traveling.

After that, Tesla Chief Technology Officer JB Straubel said that the automaker is working on a charging system that would get drivers out of the Supercharger stations and back on the road with a full charge in just 5 minutes.