Edited from Aptana