diff --git CMakeLists.txt CMakeLists.txt
index 70c3c64..0f52f1c 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -116,7 +116,9 @@ endif ()
 # -----------------------------------------------------------------------------
 # Determine the operating system
 # -----------------------------------------------------------------------------
-if (UNIX)
+if (AROS)
+    set(WTF_OS_AROS 1)
+elseif (UNIX)
     if (APPLE)
         set(WTF_OS_MAC_OS_X 1)
     else ()
@@ -125,25 +127,33 @@ if (UNIX)
 elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
     set(WTF_OS_WINDOWS 1)
 else ()
-#    message(FATAL_ERROR "Unknown OS '${CMAKE_SYSTEM_NAME}'")
+    message(FATAL_ERROR "Unknown OS '${CMAKE_SYSTEM_NAME}'")
 endif ()
 
-# -----------------------------------------------------------------------------
-# Default library types
-# -----------------------------------------------------------------------------
-option(SHARED_CORE "build JavaScriptCore and WebCore as shared libraries")
-
-if (SHARED_CORE)
-    set(JavaScriptCore_LIBRARY_TYPE SHARED)
-    set(WebCore_LIBRARY_TYPE SHARED)
-else ()
-    set(JavaScriptCore_LIBRARY_TYPE SHARED)
+if (AROS)
+    set(JavaScriptCore_LIBRARY_TYPE STATIC)
     set(WebCore_LIBRARY_TYPE STATIC)
-endif ()
+    set(WebKit_LIBRARY_TYPE STATIC)
+    set(WebKit2_LIBRARY_TYPE STATIC)
+    set(WebCoreTestSupport_LIBRARY_TYPE STATIC)
+else ()
+    # -----------------------------------------------------------------------------
+    # Default library types
+    # -----------------------------------------------------------------------------
+    option(SHARED_CORE "build JavaScriptCore and WebCore as shared libraries")
+
+    if (SHARED_CORE)
+        set(JavaScriptCore_LIBRARY_TYPE SHARED)
+        set(WebCore_LIBRARY_TYPE SHARED)
+    else ()
+        set(JavaScriptCore_LIBRARY_TYPE SHARED)
+        set(WebCore_LIBRARY_TYPE STATIC)
+    endif ()
 
-set(WebKit_LIBRARY_TYPE SHARED)
-set(WebKit2_LIBRARY_TYPE SHARED)
-set(WebCoreTestSupport_LIBRARY_TYPE STATIC)
+    set(WebKit_LIBRARY_TYPE SHARED)
+    set(WebKit2_LIBRARY_TYPE SHARED)
+    set(WebCoreTestSupport_LIBRARY_TYPE STATIC)
+endif ()
 
 # -----------------------------------------------------------------------------
 # Install JavaScript shell
diff --git mmakefile.src mmakefile.src
--- mmakefile.src	(nonexistent)
+++ mmakefile.src	(working copy)
@@ -0,0 +1,37 @@
+# Copyright © 2015-2016, The AROS Development Team. All rights reserved.
+# $Id$
+
+include $(SRCDIR)/config/aros.cfg
+
+ODYSSEY_EXEDIR := $(CONTRIBDIR)/Test/Odyssey
+ODYSSEY_TARGET := owb
+#ODYSSEY_TARGET := 
+
+#MM- aros-odyssey : odyssey-webbrowser
+#MM odyssey-webbrowser : workbench-libs-freetype-includes contrib-fontconfig contrib-icu4c contrib-cairo development-libxml2 development-libxslt
+
+NOWARN_FLAGS := $(NOWARN_MISLEADING_INDENTATION) $(NOWARN_UNUSED_FUNCTION) \
+        $(NOWARN_UNUSED_PARAMETER) $(NOWARN_CPP) $(NOWARN_STRICT_OVERFLOW)
+FEATURE_FLAGS := -ffast-math -fomit-frame-pointer \
+                -fexceptions
+USER_CFLAGS := $(NOWARN_FLAGS) \
+                $(FEATURE_FLAGS)
+
+USER_CXXFLAGS := $(NOWARN_FLAGS) \
+                $(FEATURE_FLAGS)
+		
+USER_LDFLAGS := -static-libstdc++
+##ifeq ($(AROS_TARGET_CPU),x86_64)
+##VERBOSITY := -DCMAKE_VERBOSE_MAKEFILE=ON
+##endif
+
+ODYSSEY_OPTIONS := \
+    -DPORT=MUI $(VERBOSITY) \
+    -DSHARED_CORE=OFF \
+    -DCAIRO_INCLUDE_DIRS=$(AROS_DEVELOPMENT)/include/cairo/ \
+    -DFREETYPE_INCLUDE_DIRS=$(AROS_DEVELOPMENT)/include/freetype/ \
+    -DLIBXML2_INCLUDE_DIR=$(AROS_DEVELOPMENT)/include/libxml2/ \
+
+%build_with_cmake mmake=odyssey-webbrowser \
+    	prefix="$(ODYSSEY_EXEDIR)" maketarget=$(ODYSSEY_TARGET) \
+	extraoptions="$(ODYSSEY_OPTIONS)"
diff --git Source/JavaScriptCore/jit/JITOperations.cpp Source/JavaScriptCore/jit/JITOperations.cpp
index 4b58b44..4d520ed 100644
--- Source/JavaScriptCore/jit/JITOperations.cpp
+++ Source/JavaScriptCore/jit/JITOperations.cpp
@@ -1918,7 +1918,7 @@ void JIT_OPERATION operationVMHandleException(ExecState* exec)
 // testing.
 void JIT_OPERATION operationExceptionFuzz()
 {
-#if COMPILER(GCC)
+#if COMPILER(GCC) && 0
     ExecState* exec = static_cast<ExecState*>(__builtin_frame_address(1));
     void* returnPC = __builtin_return_address(0);
     doExceptionFuzzing(exec, "JITOperations", returnPC);
diff --git Source/JavaScriptCore/jsc.cpp Source/JavaScriptCore/jsc.cpp
index cee8f67..4e3d732 100644
--- Source/JavaScriptCore/jsc.cpp
+++ Source/JavaScriptCore/jsc.cpp
@@ -116,6 +116,7 @@ NO_RETURN_WITH_VALUE static void jscExit(int status)
         for (;;) {
 #if OS(WINDOWS)
             Sleep(1000);
+#elif OS(AROS)
 #else
             pause();
 #endif
diff --git Source/WTF/wtf/FeatureDefines.h Source/WTF/wtf/FeatureDefines.h
index e9841c4..4ad3918 100644
--- Source/WTF/wtf/FeatureDefines.h
+++ Source/WTF/wtf/FeatureDefines.h
@@ -322,7 +322,13 @@ the public iOS SDK. We will also need to update the FeatureDefines.xcconfig file
 #if PLATFORM(GTK)
 #endif /* PLATFORM(GTK) */
 
-/* --------- MUI port (MorphOS, AROS) --------- */
+/* --------- "Amiga" port (MorphOS, AROS) --------- */
+#if OS(AROS)
+#if !defined(ENABLE_WEBGL)
+#define ENABLE_WEBGL 1
+#endif
+#endif
+
 #if PLATFORM(MUI)
 
 #if !defined(ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH)
diff --git Source/WTF/wtf/Platform.h Source/WTF/wtf/Platform.h
index 0bce99e..4f85e45 100644
--- Source/WTF/wtf/Platform.h
+++ Source/WTF/wtf/Platform.h
@@ -701,7 +701,7 @@
 #endif
 
 #if !defined(USE_JSVALUE64) && !defined(USE_JSVALUE32_64)
-#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) \
+#if (CPU(X86_64) && (OS(AROS) || OS(UNIX) || OS(WINDOWS))) \
     || (CPU(IA64) && !CPU(IA64_32)) \
     || CPU(ALPHA) \
     || CPU(ARM64) \
diff --git Source/WTF/wtf/ProcessID.h Source/WTF/wtf/ProcessID.h
index e747671..dcdb35e 100644
--- Source/WTF/wtf/ProcessID.h
+++ Source/WTF/wtf/ProcessID.h
@@ -40,12 +40,17 @@
 
 namespace WTF {
 
-inline int getCurrentProcessID()
+#if PLATFORM(MUI)
+inline IPTR
+#else
+inline int
+#endif
+ getCurrentProcessID()
 {
 #if OS(WINDOWS)
     return GetCurrentProcessId();
 #elif PLATFORM(MUI)
-    return (int) FindTask(NULL);
+    return (IPTR) FindTask(NULL);
 #else
     return getpid();
 #endif
diff --git Source/WebCore/CMakeLists.txt Source/WebCore/CMakeLists.txt
index ea0eac3..b9c648f 100644
--- Source/WebCore/CMakeLists.txt
+++ Source/WebCore/CMakeLists.txt
@@ -157,6 +157,7 @@ set(WebCore_IDL_INCLUDES
     Modules/indexeddb
     Modules/indieui
     Modules/mediasession
+    Modules/mediasource
     Modules/mediastream
     Modules/notifications
     Modules/proximity
diff --git Source/WebCore/platform/mui/ContextMenuItemMorphOS.cpp Source/WebCore/platform/mui/ContextMenuItemMorphOS.cpp
index d5ca8c6..8d6b7d6 100755
--- Source/WebCore/platform/mui/ContextMenuItemMorphOS.cpp
+++ Source/WebCore/platform/mui/ContextMenuItemMorphOS.cpp
@@ -44,7 +44,7 @@
 #undef String
 
 struct IClass *getmenuitemclass(void);
-ULONG getv(APTR obj, ULONG attr);
+IPTR getv(APTR obj, IPTR attr);
 
 namespace WebCore {
 
@@ -54,7 +54,7 @@ ContextMenuItem::ContextMenuItem(BalMenuItem* item)
 {
 	PlatformMenuItemDescription *description = NULL;
 
-	GetAttr(MUIA_UserData, (Object *)item, (ULONGPTR)&description);
+	GetAttr(MUIA_UserData, (Object *)item, (IPTR *)&description);
 
 	if(description)
 	{
@@ -111,7 +111,7 @@ BalMenuItem* ContextMenuItem::createNativeMenuItem(const PlatformMenuItemDescrip
 		{
 			SetAttrs((Object *) menu.subMenu,
 						MUIA_Menu_Enabled, menu.enabled,
-						MUIA_UserData, (ULONG) description,
+						MUIA_UserData, (IPTR) description,
 						MUIA_Menu_Title, (menu.type == SeparatorType || title == NULL) ? NM_BARLABEL : title,
 						TAG_DONE);
 
@@ -120,11 +120,11 @@ BalMenuItem* ContextMenuItem::createNativeMenuItem(const PlatformMenuItemDescrip
 		else
 		{
 			item = (Object *) NewObject(getmenuitemclass(), NULL,
-						MUIA_UserData, (ULONG) description,
+						MUIA_UserData, (IPTR) description,
 						MUIA_Menuitem_Title, (menu.type == SeparatorType || title == NULL) ? NM_BARLABEL : title,
-						MUIA_Menuitem_Enabled, (ULONG) menu.enabled,
+						MUIA_Menuitem_Enabled, (IPTR) menu.enabled,
 						MUIA_Menuitem_Checkit, menu.type == CheckableActionType,
-						menu.type == CheckableActionType ? MUIA_Menuitem_Checked : TAG_IGNORE, (ULONG) menu.checked,
+						menu.type == CheckableActionType ? MUIA_Menuitem_Checked : TAG_IGNORE, (IPTR) menu.checked,
 					 End;
 		}
 
diff --git Source/WebCore/platform/mui/PasteboardMorphOS.cpp Source/WebCore/platform/mui/PasteboardMorphOS.cpp
index d399435..377823f 100755
--- Source/WebCore/platform/mui/PasteboardMorphOS.cpp
+++ Source/WebCore/platform/mui/PasteboardMorphOS.cpp
@@ -86,7 +86,7 @@ static void writeUTF8(const char* data, size_t len)
 			{
 				if (ClipboardHandle *ch = OpenClipboard(PRIMARY_CLIP))
 				{
-					ih->iff_Stream = (uint32)ch;
+					ih->iff_Stream = (IPTR)ch;
 					InitIFFasClip(ih);
 
 					if (0 == OpenIFF(ih, IFFF_WRITE))
@@ -545,7 +545,7 @@ static String getPlainText(Frame* )
 
     if (IFFHandle *ih = AllocIFF()) {
         if (ClipboardHandle *ch = OpenClipboard(PRIMARY_CLIP)) {
-            ih->iff_Stream = (uint32)ch;
+            ih->iff_Stream = (IPTR)ch;
             InitIFFasClip(ih);
 
             if (0 == OpenIFF(ih, IFFF_READ)) {
diff --git Source/WebCore/platform/mui/PlatformKeyboardEventMorphOS.cpp Source/WebCore/platform/mui/PlatformKeyboardEventMorphOS.cpp
index a1f26c5..702f175 100755
--- Source/WebCore/platform/mui/PlatformKeyboardEventMorphOS.cpp
+++ Source/WebCore/platform/mui/PlatformKeyboardEventMorphOS.cpp
@@ -138,7 +138,7 @@ static int ConvertAmigaKeyToVirtualKey(struct IntuiMessage *im)
 				ie.ie_Code = im->Code & ~IECODE_UP_PREFIX;
 				ie.ie_Qualifier = 0x8000; //im->Qualifier & ~(IEQUALIFIER_LCOMMAND | IEQUALIFIER_RCOMMAND);
 				//ie.ie_Qualifier = im->Qualifier & ~(IEQUALIFIER_LCOMMAND | IEQUALIFIER_RCOMMAND);
-				ie.ie_EventAddress = (APTR *) *((ULONG *)im->IAddress);
+				ie.ie_EventAddress = (APTR *) *((IPTR *)im->IAddress);
 
 				if (MapRawKey(&ie, (STRPTR)&c, 1, NULL) == 1)
 				{
@@ -347,7 +347,7 @@ static String keyIdentifierForAmigaKeyCode(struct IntuiMessage *im)
 				ie.ie_Code = im->Code & ~IECODE_UP_PREFIX;
 				ie.ie_Qualifier = 0x8000; //im->Qualifier & ~(IEQUALIFIER_LCOMMAND | IEQUALIFIER_RCOMMAND);
 				//ie.ie_Qualifier = im->Qualifier & ~(IEQUALIFIER_LCOMMAND | IEQUALIFIER_RCOMMAND);
-				ie.ie_EventAddress = (APTR *) *((ULONG *)im->IAddress);
+				ie.ie_EventAddress = (APTR *) *((IPTR *)im->IAddress);
 
 				if (MapRawKey(&ie, (STRPTR)&c, 1, NULL) == 1)
 				{
diff --git Source/WebCore/platform/mui/acinerella.c Source/WebCore/platform/mui/acinerella.c
index 5807b14..b73ffbd 100644
--- Source/WebCore/platform/mui/acinerella.c
+++ Source/WebCore/platform/mui/acinerella.c
@@ -247,26 +247,7 @@ static void av_log_callback(void* ptr, int level, const char* fmt, va_list vl)
 static int initialized = 0;
 ac_package flush_pkt;
 
-static struct URLProtocol OWBProtocol =
-{
-	"owb",
-	&file_open,
-	NULL,
-	&file_read,
-	&file_write,
-	&file_seek,
-	&file_close,
-	NULL,
-	NULL,
-	NULL,
-	NULL,
-	NULL,
-	NULL,
-	0,
-	NULL,
-	0,
-	NULL
-};
+static struct URLProtocol OWBProtocol;
 
 lp_ac_package ac_flush_packet(void)
 {
@@ -282,7 +263,15 @@ lp_ac_instance CALL_CONVT ac_init(void)
 		D(kprintf("Initializing ffmpeg\n"));
 
 		ObtainSemaphore(&semAcinerella);
-		
+
+                memset(&OWBProtocol, 0, sizeof(struct URLProtocol));
+                OWBProtocol.name = "owb";
+                OWBProtocol.url_open = &file_open;
+                OWBProtocol.url_read = &file_read;
+                OWBProtocol.url_write = &file_write;
+                OWBProtocol.url_seek = &file_seek;
+                OWBProtocol.url_close = &file_close;
+
 		av_log_set_callback(av_log_callback/*AV_LOG_QUIET*/);
 		avcodec_register_all();
 		ffurl_register_protocol(&OWBProtocol);
@@ -521,7 +510,7 @@ lp_ac_package CALL_CONVT ac_read_package(lp_ac_instance pacInstance)
 	{
 		AVPacket *clone = ac_clone_packet(&Package);
 		
-		av_free_packet(&Package);
+		av_packet_unref(&Package);
 
 		if(clone)
 		{
@@ -556,7 +545,7 @@ void CALL_CONVT ac_free_package(lp_ac_package pPackage)
 	if (pPackage != NULL && pPackage != ac_flush_packet())
 	{
 		D(kprintf("Free packet %p (data %p size %d stream %d destruct %p priv %p)\n", pPackage, ((lp_ac_package_data)pPackage)->package.data, ((lp_ac_package_data)pPackage)->package.size, ((lp_ac_package_data)pPackage)->package.stream_index, ((lp_ac_package_data)pPackage)->ffpackage->destruct, ((lp_ac_package_data)pPackage)->ffpackage->priv));
-		av_free_packet(((lp_ac_package_data)pPackage)->ffpackage);
+		av_packet_unref(((lp_ac_package_data)pPackage)->ffpackage);
 		mgr_free(((lp_ac_package_data)pPackage)->ffpackage);
 		mgr_free((lp_ac_package_data)pPackage);
 	}
@@ -566,18 +555,18 @@ void CALL_CONVT ac_free_package(lp_ac_package pPackage)
 //--- Decoder management ---
 //
 
-enum PixelFormat convert_pix_format(ac_output_format fmt)
+enum AVPixelFormat convert_pix_format(ac_output_format fmt)
 {
 	switch (fmt)
 	{
-		case AC_OUTPUT_RGB24:   return PIX_FMT_RGB24;
-		case AC_OUTPUT_BGR24:   return PIX_FMT_BGR24;
-		case AC_OUTPUT_RGBA32:  return PIX_FMT_RGB32;
-		case AC_OUTPUT_BGRA32:  return PIX_FMT_BGR32;
-		case AC_OUTPUT_YUV420P: return PIX_FMT_YUV420P;
-		case AC_OUTPUT_YUV422:  return PIX_FMT_YUYV422;
+		case AC_OUTPUT_RGB24:   return AV_PIX_FMT_RGB24;
+		case AC_OUTPUT_BGR24:   return AV_PIX_FMT_BGR24;
+		case AC_OUTPUT_RGBA32:  return AV_PIX_FMT_RGB32;
+		case AC_OUTPUT_BGRA32:  return AV_PIX_FMT_BGR32;
+		case AC_OUTPUT_YUV420P: return AV_PIX_FMT_YUV420P;
+		case AC_OUTPUT_YUV422:  return AV_PIX_FMT_YUYV422;
 	}
-	return PIX_FMT_RGB24;
+	return AV_PIX_FMT_RGB24;
 }
 
 AVFrame* ac_get_frame(lp_ac_decoder decoder)
@@ -627,20 +616,19 @@ int	ac_set_output_format(lp_ac_decoder decoder, ac_output_format fmt)
 				return -1;
 		    }
 
-			pDecoder->decoder.buffer_size = 2 * avpicture_get_size(convert_pix_format(pDecoder->decoder.pacInstance->output_format),
-																   pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height);
+			pDecoder->decoder.buffer_size = 2 * av_image_get_buffer_size(convert_pix_format(pDecoder->decoder.pacInstance->output_format),
+																   pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height, 1);
 			pDecoder->decoder.pBuffer = (char *)mgr_malloc(pDecoder->decoder.buffer_size);
 
 		    if(pDecoder->decoder.pBuffer)
 		    {
 				memset(pDecoder->decoder.pBuffer, 0, pDecoder->decoder.buffer_size);
-			    //Link decoder to buffer
-			    avpicture_fill(
-			      (AVPicture*)(pDecoder->pFrameRGB),
-				  (const uint8_t *) pDecoder->decoder.pBuffer, convert_pix_format(pDecoder->decoder.pacInstance->output_format),
-			      pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height);
+				//Link decoder to buffer
+				av_image_fill_arrays(pDecoder->pFrameRGB->data, pDecoder->pFrameRGB->linesize,
+				                       (const uint8_t *) pDecoder->decoder.pBuffer, convert_pix_format(pDecoder->decoder.pacInstance->output_format),
+				                       pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height, 1);
 
-			    pDecoder->decoder.linesize = pDecoder->pFrameRGB->linesize[0];
+				pDecoder->decoder.linesize = pDecoder->pFrameRGB->linesize[0];
 		    }
 		    else
 		    {
@@ -750,20 +738,19 @@ void* ac_create_video_decoder(lp_ac_instance pacInstance, lp_ac_stream_info info
 		return NULL;
 	}
 
-	pDecoder->decoder.buffer_size = 2 * avpicture_get_size(convert_pix_format(pacInstance->output_format),
-	                                                       pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height);
+	pDecoder->decoder.buffer_size = 2 * av_image_get_buffer_size(convert_pix_format(pacInstance->output_format),
+	                                                       pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height, 1);
 	pDecoder->decoder.pBuffer = (char *)mgr_malloc(pDecoder->decoder.buffer_size);
 
 	if(pDecoder->decoder.pBuffer)
 	{
 		memset(pDecoder->decoder.pBuffer, 0, pDecoder->decoder.buffer_size);
 
-	    avpicture_fill(
-	      (AVPicture*)(pDecoder->pFrameRGB), 
-		  (const uint8_t *) pDecoder->decoder.pBuffer, convert_pix_format(pacInstance->output_format),
-	      pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height);
+		av_image_fill_arrays(pDecoder->pFrameRGB->data, pDecoder->pFrameRGB->linesize,
+	                               (const uint8_t *) pDecoder->decoder.pBuffer, convert_pix_format(pacInstance->output_format),
+	                               pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height, 1);
 
-	    pDecoder->decoder.linesize = pDecoder->pFrameRGB->linesize[0];
+		pDecoder->decoder.linesize = pDecoder->pFrameRGB->linesize[0];
 	}
 	else
 	{
diff --git Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp
index 94810b2..cae179d 100644
--- Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp
+++ Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp
@@ -99,7 +99,7 @@ bool SocketStreamHandle::readData(CURL* curlHandle)
 
     CURLcode ret = curl_easy_recv(curlHandle, data.get(), bufferSize, &bytesRead);
 
-    if (ret == CURLE_OK && bytesRead >= 0) {
+    if (ret == CURLE_OK && (ssize_t)bytesRead >= 0) {
         m_mutexReceive.lock();
         m_receiveData.append(SocketData { WTF::move(data), static_cast<int>(bytesRead) });
         m_mutexReceive.unlock();
diff --git Source/WebCore/platform/posix/FileSystemPOSIX.cpp Source/WebCore/platform/posix/FileSystemPOSIX.cpp
index e55be89..edaeba9 100644
--- Source/WebCore/platform/posix/FileSystemPOSIX.cpp
+++ Source/WebCore/platform/posix/FileSystemPOSIX.cpp
@@ -372,7 +372,7 @@ char *dirname (char *path)
   if (slash == 0)
     {
       /* File is in the current directory.  */
-      path = ".";
+      path = (char *)".";
       length = 1;
     }
   else
diff --git Source/WebCore/rendering/shapes/BoxShape.cpp Source/WebCore/rendering/shapes/BoxShape.cpp
index a759aeb..9ec11e2 100644
--- Source/WebCore/rendering/shapes/BoxShape.cpp
+++ Source/WebCore/rendering/shapes/BoxShape.cpp
@@ -41,7 +41,11 @@ static inline LayoutUnit adjustRadiusForMarginBoxShape(LayoutUnit radius, Layout
     if (!margin)
         return radius;
 
+#if !defined(__AROS__)
     LayoutUnit ratio = radius / margin;
+#else
+    double ratio = radius / margin;
+#endif
     if (ratio < 1)
         return radius + (margin * (1 + pow(ratio - 1, 3)));
 
diff --git Source/WebKit/mui/Api/MorphOS/AutofillBackingStore.cpp Source/WebKit/mui/Api/MorphOS/AutofillBackingStore.cpp
index 6286b5f..43c4c2e 100755
--- Source/WebKit/mui/Api/MorphOS/AutofillBackingStore.cpp
+++ Source/WebKit/mui/Api/MorphOS/AutofillBackingStore.cpp
@@ -167,7 +167,7 @@ Vector<String> AutofillBackingStore::get(const String& name, const String& value
     if (name.isEmpty() || valueHint.isEmpty() || !m_getStatement)
         return candidates;
 
-	String value = "%" + valueHint + "%";
+    String value = "%" + valueHint + "%";
     m_getStatement->bindText(1, name);
     m_getStatement->bindText(2, value);
 
diff --git Source/WebKit/mui/Api/MorphOS/AutofillManager.cpp Source/WebKit/mui/Api/MorphOS/AutofillManager.cpp
index 6120fa4..cb93061 100644
--- Source/WebKit/mui/Api/MorphOS/AutofillManager.cpp
+++ Source/WebKit/mui/Api/MorphOS/AutofillManager.cpp
@@ -49,9 +49,9 @@ void AutofillManager::didChangeInTextField(HTMLInputElement* element)
     if (m_element != element)
         m_element = element;
 
-	IntRect rect = element->screenRect();
+    IntRect rect = element->screenRect();
     Vector<String> candidates = autofillBackingStore().get(element->getAttribute(HTMLNames::nameAttr).string(), element->value());
-	DoMethod((Object *) m_browser, MM_OWBBrowser_Autofill_ShowPopup, &candidates, &rect);
+    DoMethod((Object *) m_browser, MM_OWBBrowser_Autofill_ShowPopup, &candidates, &rect);
 }
 
 void AutofillManager::autofillTextField(const String& value)
diff --git Source/WebKit/mui/Api/MorphOS/ExtCredential.h Source/WebKit/mui/Api/MorphOS/ExtCredential.h
index cce5f2e..5c86c27 100755
--- Source/WebKit/mui/Api/MorphOS/ExtCredential.h
+++ Source/WebKit/mui/Api/MorphOS/ExtCredential.h
@@ -109,16 +109,16 @@ inline bool operator==(const ExtCredential& a, const ExtCredential& b)
         return false;
     if (a.persistence() != b.persistence())
         return false;
-	if (a.realm() != b.realm())
+    if (a.realm() != b.realm())
         return false;
-	if (a.userFieldName() != b.userFieldName())
+    if (a.userFieldName() != b.userFieldName())
         return false;
-	if (a.passwordFieldName() != b.passwordFieldName())
+    if (a.passwordFieldName() != b.passwordFieldName())
         return false;
-	if (a.type() != b.type())
+    if (a.type() != b.type())
+        return false;
+    if (a.flags() != b.flags())
         return false;
-	if (a.flags() != b.flags())
-		return false;
 
     return true;
 }
diff --git Source/WebKit/mui/Api/MorphOS/addressbargroupclass.cpp Source/WebKit/mui/Api/MorphOS/addressbargroupclass.cpp
index 6c0e22d..cec1e48 100755
--- Source/WebKit/mui/Api/MorphOS/addressbargroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/addressbargroupclass.cpp
@@ -206,7 +206,7 @@ DEFGET
   		        return DoMethodA(data->pop_path, (_Msg_*) msg);
 
 		case MA_AddressBarGroup_PopString:
-			*msg->opg_Storage = (ULONG) data->pop_path;
+			*msg->opg_Storage = (IPTR) data->pop_path;
 			return TRUE;
 
 		case MUIA_Popstring_String:
diff --git Source/WebKit/mui/Api/MorphOS/appclass.cpp Source/WebKit/mui/Api/MorphOS/appclass.cpp
index bc79749..64c43d3 100644
--- Source/WebKit/mui/Api/MorphOS/appclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/appclass.cpp
@@ -430,7 +430,7 @@ ULONG menus_init(void)
 	{
 		if (nmp->nm_Label != NM_BARLABEL)
 		{
-			nmp->nm_Label = (STRPTR)GSI((ULONG)nmp->nm_Label);
+			nmp->nm_Label = (STRPTR)GSI((IPTR)nmp->nm_Label);
 		}
 		nmp++;
 	}
@@ -552,13 +552,13 @@ AROS_UFH3
 
 	Object *window = (Object *) getv(obj, MA_OWBApp_ActiveWindow);
 
-	if ((ULONG)h->h_Data == REXX_ABOUT)
+	if ((IPTR)h->h_Data == REXX_ABOUT)
 	{
 		DoMethod(obj, MM_OWBApp_About);
 	}
 	else if (window)
 	{
-		switch ((ULONG)h->h_Data)
+		switch ((IPTR)h->h_Data)
 		{
 			case REXX_PRINT:
 				DoMethod(window, MM_OWBWindow_Print);
@@ -816,18 +816,18 @@ String BufferFile(const char* url)
 	String path = url;
 
 	OWBFile *configFile = new OWBFile(path);
-    if (!configFile)
-        return String();
+	if (!configFile)
+		return String();
 	if (configFile->open('r') == -1)
 	{
-        delete configFile;
-        return String();
-    }
+		delete configFile;
+		return String();
+	}
 	char *buffer = configFile->read(configFile->getSize());
 	String fileBuffer = buffer;
 	delete [] buffer;
-    configFile->close();
-    delete configFile;
+	configFile->close();
+	delete configFile;
 
 	return fileBuffer;
 }
@@ -986,7 +986,7 @@ DEFNEW
 		else
 		{
 			CoerceMethod(cl, obj, OM_DISPOSE);
-			return NULL;
+			return (IPTR)NULL;
 		}
 
 		/* Load settings */
@@ -1040,12 +1040,12 @@ DEFNEW
 
 		if(restoremode == MV_OWBApp_SessionRestore_Off || DoMethod(app, MM_OWBApp_RestoreSession, restoremode == MV_OWBApp_SessionRestore_Ask ? TRUE : FALSE, FALSE) == FALSE)
 		{
-			char *starturl = (char *) GetTagData(MA_OWBBrowser_URL, NULL, msg->ops_AttrList);
+			char *starturl = (char *) GetTagData(MA_OWBBrowser_URL, (IPTR)NULL, msg->ops_AttrList);
 			DoMethod(app, MM_OWBApp_AddWindow, (starturl && starturl[0]) ? starturl : data->startpage, FALSE, NULL, TRUE, NULL, FALSE);
 		}
 		else
 		{
-			char *starturl = (char *) GetTagData(MA_OWBBrowser_URL, NULL, msg->ops_AttrList);
+			char *starturl = (char *) GetTagData(MA_OWBBrowser_URL, (IPTR)NULL, msg->ops_AttrList);
 			if(starturl && starturl[0])
 			{
 				DoMethod(app, MM_OWBApp_AddBrowser, NULL, starturl, FALSE, NULL, FALSE, FALSE, TRUE);
@@ -1056,7 +1056,7 @@ DEFNEW
 		DoMethod(app, MUIM_Notify, MA_OWBApp_BookmarksChanged, MUIV_EveryTime, obj, 1, MM_OWBApp_BookmarksChanged);
 	}
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 void FreeWebKitLeakedObjects()
@@ -1153,19 +1153,19 @@ DEFGET
 /* Settings */
 		case MA_OWBApp_DownloadDirectory:
 		{
-			*msg->opg_Storage = (ULONG) data->download_dir;
+			*msg->opg_Storage = (IPTR) data->download_dir;
 		}
 		return TRUE;
 
 		case MA_OWBApp_DownloadAutoClose:
 		{
-			*msg->opg_Storage = (ULONG) data->downloadautoclose;
+			*msg->opg_Storage = (IPTR) data->downloadautoclose;
 		}
 		return TRUE;
 
 		case MA_OWBApp_DownloadSave:
 		{
-			*msg->opg_Storage = (ULONG) data->savedownloads;
+			*msg->opg_Storage = (IPTR) data->savedownloads;
 		}
 		return TRUE;
 
@@ -1177,91 +1177,91 @@ DEFGET
 
 		case MA_OWBApp_DefaultURL:
 		{
-			*msg->opg_Storage = (ULONG) data->homepage;
+			*msg->opg_Storage = (IPTR) data->homepage;
 		}
 		return TRUE;
 
 		case MA_OWBApp_StartPage:
 		{
-			*msg->opg_Storage = (ULONG) data->startpage;
+			*msg->opg_Storage = (IPTR) data->startpage;
 		}
 		return TRUE;
 
 		case MA_OWBApp_NewTabPage:
 		{
-			*msg->opg_Storage = (ULONG) data->newtabpage;
+			*msg->opg_Storage = (IPTR) data->newtabpage;
 		}
 		return TRUE;
 
 		case MA_OWBApp_CLIDevice:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->prefswin, MA_OWBApp_CLIDevice);
+			*msg->opg_Storage = (IPTR) getv(data->prefswin, MA_OWBApp_CLIDevice);
 		}
 		return TRUE;
 
 		case MA_OWBApp_ShowValidationButtons:
 		{
-			*msg->opg_Storage = (ULONG) data->showvalidationbuttons;
+			*msg->opg_Storage = (IPTR) data->showvalidationbuttons;
 		}
 		return TRUE;
 
 		case MA_OWBApp_ShowSeparators:
 		{
-			*msg->opg_Storage = (ULONG) data->showseparators;
+			*msg->opg_Storage = (IPTR) data->showseparators;
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnablePointers:
 		{
-			*msg->opg_Storage = (ULONG) data->enablepointers;
+			*msg->opg_Storage = (IPTR) data->enablepointers;
 		}
 		return TRUE;
 
 		case MA_OWBApp_ShowButtonFrame:
 		{
-			*msg->opg_Storage = (ULONG) data->showbuttonframe;
+			*msg->opg_Storage = (IPTR) data->showbuttonframe;
 		}
 		return TRUE;
 
 		case MA_OWBApp_ShowSearchBar:
 		{
-			*msg->opg_Storage = (ULONG) data->showsearchbar;
+			*msg->opg_Storage = (IPTR) data->showsearchbar;
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableTabTransferAnim:
 		{
-			*msg->opg_Storage = (ULONG) data->enabletabtransferanim;
+			*msg->opg_Storage = (IPTR) data->enabletabtransferanim;
 		}
 		return TRUE;
 
 		case MA_OWBApp_NewPagePolicy:
 		{
-			*msg->opg_Storage = (ULONG) data->newpagepolicy;
+			*msg->opg_Storage = (IPTR) data->newpagepolicy;
 		}
 		return TRUE;
 
 		case MA_OWBApp_NewPagePosition:
 		{
-			*msg->opg_Storage = (ULONG) data->newpageposition;
+			*msg->opg_Storage = (IPTR) data->newpageposition;
 		}
 		return TRUE;
 
 		case MA_OWBApp_PopupPolicy:
 		{
-			*msg->opg_Storage = (ULONG) data->popuppolicy;
+			*msg->opg_Storage = (IPTR) data->popuppolicy;
 		}
 		return TRUE;
 
 		case MA_OWBApp_ToolButtonType:
 		{
-			*msg->opg_Storage = (ULONG) data->toolbuttontype;
+			*msg->opg_Storage = (IPTR) data->toolbuttontype;
 		}
 		return TRUE;
 
 		case MA_OWBApp_URLCompletionType:
 		{
-			*msg->opg_Storage = (ULONG) data->urlcompletiontype;
+			*msg->opg_Storage = (IPTR) data->urlcompletiontype;
 		}
 		return TRUE;
 
@@ -1301,7 +1301,7 @@ DEFGET
 				}
 			}
 
-			*msg->opg_Storage = (ULONG) ret;
+			*msg->opg_Storage = (IPTR) ret;
 		}
 		return TRUE;
 
@@ -1327,196 +1327,196 @@ DEFGET
 				}
 			}
 			#endif
-			*msg->opg_Storage = (ULONG) ret;
+			*msg->opg_Storage = (IPTR) ret;
 		}
 		return TRUE;
 
 		case MA_OWBApp_ErrorMode:
 		{
-			*msg->opg_Storage = (ULONG) data->errormode;
+			*msg->opg_Storage = (IPTR) data->errormode;
 		}
 		return TRUE;
 
 		case MA_OWBApp_MiddleButtonPolicy:
 		{
-			*msg->opg_Storage = (ULONG) data->middlebuttonpolicy;
+			*msg->opg_Storage = (IPTR) data->middlebuttonpolicy;
 		}
 		return TRUE;
 
 		case MA_OWBApp_ShowFavIcons:
 		{
-			*msg->opg_Storage = (ULONG) data->showfavicons;
+			*msg->opg_Storage = (IPTR) data->showfavicons;
 		}
 		return TRUE;
 
 		case MA_OWBApp_DidReceiveFavIcon:
 		{
-			*msg->opg_Storage = (ULONG) data->favicon_url;
+			*msg->opg_Storage = (IPTR) data->favicon_url;
 		}
 		return TRUE;
 
 
 		case MA_OWBApp_FavIconImportComplete:
 		{
-			*msg->opg_Storage = (ULONG) data->favicon_import_complete;
+			*msg->opg_Storage = (IPTR) data->favicon_import_complete;
 		}
 		return TRUE;
 
 		case MA_OWBApp_QuickLinkLook:
 		{
-			*msg->opg_Storage = (ULONG) data->quicklinklook;
+			*msg->opg_Storage = (IPTR) data->quicklinklook;
 		}
 		return TRUE;
 
 		case MA_OWBApp_QuickLinkLayout:
 		{
-			*msg->opg_Storage = (ULONG) data->quicklinklayout;
+			*msg->opg_Storage = (IPTR) data->quicklinklayout;
 		}
 		return TRUE;
 
 		case MA_OWBApp_QuickLinkRows:
 		{
-			*msg->opg_Storage = (ULONG) data->quicklinkrows;
+			*msg->opg_Storage = (IPTR) data->quicklinkrows;
 		}
 		return TRUE;
 
 		case MA_OWBApp_QuickLinkPosition:
 		{
-			*msg->opg_Storage = (ULONG) data->quicklinkposition;
+			*msg->opg_Storage = (IPTR) data->quicklinkposition;
 		}
 		return TRUE;
 
 		case MA_OWBApp_SaveSession:
 		{
-			*msg->opg_Storage = (ULONG) data->savesession;
+			*msg->opg_Storage = (IPTR) data->savesession;
 		}
 		return TRUE;
 
 		case MA_OWBApp_DeleteSessionAtExit:
 		{
-			*msg->opg_Storage = (ULONG) data->deletesessionatexit;
+			*msg->opg_Storage = (IPTR) data->deletesessionatexit;
 		}
 		return TRUE;
 
 		case MA_OWBApp_SessionRestoreMode:
 		{
-			*msg->opg_Storage = (ULONG) data->sessionrestoremode;
+			*msg->opg_Storage = (IPTR) data->sessionrestoremode;
 		}
 		return TRUE;
 
 		case MA_OWBApp_SaveCookies:
 		{
-			*msg->opg_Storage = (ULONG) data->savecookies;
+			*msg->opg_Storage = (IPTR) data->savecookies;
 		}
 		return TRUE;
 
 		case MA_OWBApp_CookiesPolicy:
 		{
-			*msg->opg_Storage = (ULONG) data->cookiespolicy;
+			*msg->opg_Storage = (IPTR) data->cookiespolicy;
 		}
 		return TRUE;
 
 /*
 		case MA_OWBApp_PersistantCookiesPolicy:
 		{
-			*msg->opg_Storage = (ULONG) data->temporarycookiespolicy;
+			*msg->opg_Storage = (IPTR) data->temporarycookiespolicy;
 		}
 		return TRUE;
 
 		case MA_OWBApp_TemporaryCookiesPolicy:
 		{
-			*msg->opg_Storage = (ULONG) data->persistantcookiespolicy;
+			*msg->opg_Storage = (IPTR) data->persistantcookiespolicy;
 		}
 		return TRUE;
 */
 
 		case MA_OWBApp_SaveFormCredentials:
 		{
-			*msg->opg_Storage = (ULONG) data->savecredentials;
+			*msg->opg_Storage = (IPTR) data->savecredentials;
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableFormAutofill:
 		{
-			*msg->opg_Storage = (ULONG) data->formautofill;
+			*msg->opg_Storage = (IPTR) data->formautofill;
 		}
 		return TRUE;
 
 		case MA_OWBApp_SaveHistory:
 		{
-			*msg->opg_Storage = (ULONG) data->savehistory;
+			*msg->opg_Storage = (IPTR) data->savehistory;
 		}
 		return TRUE;
 
 		case MA_OWBApp_HistoryItemLimit:
 		{
-			*msg->opg_Storage = (ULONG) data->historyitems;
+			*msg->opg_Storage = (IPTR) data->historyitems;
 		}
 		return TRUE;
 
 		case MA_OWBApp_HistoryAgeInDaysLimit:
 		{
-			*msg->opg_Storage = (ULONG) data->historyage;
+			*msg->opg_Storage = (IPTR) data->historyage;
 		}
 		return TRUE;
 
 		case MA_OWBApp_UserAgent:
 		{
-			*msg->opg_Storage = (ULONG) data->useragent;
+			*msg->opg_Storage = (IPTR) data->useragent;
 		}
 		return TRUE;
 
 		case MA_OWBApp_IgnoreSSLErrors:
 		{
-			*msg->opg_Storage = (ULONG) data->ignoreSSLErrors;
+			*msg->opg_Storage = (IPTR) data->ignoreSSLErrors;
 		}
 		return TRUE;
 
 		case MA_OWBApp_CertificatePath:
 		{
-			*msg->opg_Storage = (ULONG) data->certificate_path;
+			*msg->opg_Storage = (IPTR) data->certificate_path;
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableInspector:
 		{
-			*msg->opg_Storage = (ULONG) data->inspector;
+			*msg->opg_Storage = (IPTR) data->inspector;
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableVP8:
 		{
-			*msg->opg_Storage = (ULONG) data->use_webm;
+			*msg->opg_Storage = (IPTR) data->use_webm;
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableFLV:
 		{
-			*msg->opg_Storage = (ULONG) data->use_flv;
+			*msg->opg_Storage = (IPTR) data->use_flv;
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableOgg:
 		{
-			*msg->opg_Storage = (ULONG) data->use_ogg;
+			*msg->opg_Storage = (IPTR) data->use_ogg;
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableMP4:
 		{
-			*msg->opg_Storage = (ULONG) data->use_mp4;
+			*msg->opg_Storage = (IPTR) data->use_mp4;
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnablePartialContent:
 		{
-			*msg->opg_Storage = (ULONG) data->use_partial_content;
+			*msg->opg_Storage = (IPTR) data->use_partial_content;
 		}
 		return TRUE;
 
 		case MA_OWBApp_LoopFilterMode:
 		{
-			*msg->opg_Storage = (ULONG) data->loopfilter_mode;
+			*msg->opg_Storage = (IPTR) data->loopfilter_mode;
 		}
 		return TRUE;
 
@@ -1524,37 +1524,37 @@ DEFGET
 
 		case MA_OWBApp_ShowBookmarkPanel:
 		{
-			*msg->opg_Storage = (ULONG) data->appsettings.showbookmarkpanel;
+			*msg->opg_Storage = (IPTR) data->appsettings.showbookmarkpanel;
 		}
 		return TRUE;
 
 		case MA_OWBApp_ShowHistoryPanel:
 		{
-			*msg->opg_Storage = (ULONG) data->appsettings.showhistorypanel;
+			*msg->opg_Storage = (IPTR) data->appsettings.showhistorypanel;
 		}
 		return TRUE;
 
 		case MA_OWBApp_PanelWeight:
 		{
-			*msg->opg_Storage = (ULONG) data->appsettings.panelweight;
+			*msg->opg_Storage = (IPTR) data->appsettings.panelweight;
 		}
 		return TRUE;
 
 		case MA_OWBApp_Bookmark_AddToMenu:
 		{
-			*msg->opg_Storage = (ULONG) data->appsettings.addbookmarkstomenu;
+			*msg->opg_Storage = (IPTR) data->appsettings.addbookmarkstomenu;
 		}
 		return TRUE;
 
 		case MA_OWBApp_ContinuousSpellChecking:
 		{
-			*msg->opg_Storage = (ULONG) data->appsettings.continuousspellchecking;
+			*msg->opg_Storage = (IPTR) data->appsettings.continuousspellchecking;
 		}
 		return TRUE;
 
 		case MA_OWBApp_PrivateBrowsing:
 		{
-			*msg->opg_Storage = (ULONG) data->appsettings.privatebrowsing;
+			*msg->opg_Storage = (IPTR) data->appsettings.privatebrowsing;
 		}
 		return TRUE;
 
@@ -1562,7 +1562,7 @@ DEFGET
 
 		case MA_OWBApp_CurrentDirectory:
 		{
-			*msg->opg_Storage = (ULONG) data->current_dir;
+			*msg->opg_Storage = (IPTR) data->current_dir;
 		}
 		return TRUE;
 
@@ -1576,7 +1576,7 @@ DEFGET
 				browser = (Object *) getv(window, MA_OWBWindow_ActiveBrowser);
 			}
 
-			*msg->opg_Storage = (ULONG) browser;
+			*msg->opg_Storage = (IPTR) browser;
 		}
 		return TRUE;
 
@@ -1609,61 +1609,61 @@ DEFGET
 				window = firstwindow;
 			}
 
-			*msg->opg_Storage = (ULONG) window;
+			*msg->opg_Storage = (IPTR) window;
 		}
 		return TRUE;
 
 		case MA_OWBApp_BookmarkWindow:
 		{
-			*msg->opg_Storage = (ULONG) data->bookmarkwin;
+			*msg->opg_Storage = (IPTR) data->bookmarkwin;
 		}
 		return TRUE;
 
 		case MA_OWBApp_DownloadWindow:
 		{
-			*msg->opg_Storage = (ULONG) data->dlwin;
+			*msg->opg_Storage = (IPTR) data->dlwin;
 		}
 		return TRUE;
 
 		case MA_OWBApp_SearchManagerWindow:
 		{
-			*msg->opg_Storage = (ULONG) data->searchmanagerwin;
+			*msg->opg_Storage = (IPTR) data->searchmanagerwin;
 		}
 		return TRUE;
 
 		case MA_OWBApp_ScriptManagerWindow:
 		{
-			*msg->opg_Storage = (ULONG) data->scriptmanagerwin;
+			*msg->opg_Storage = (IPTR) data->scriptmanagerwin;
 		}
 		return TRUE;
 
 		case MA_OWBApp_PrinterWindow:
 		{
-			*msg->opg_Storage = (ULONG) data->printerwin;
+			*msg->opg_Storage = (IPTR) data->printerwin;
 		}
 		return TRUE;
 
 		case MA_OWBApp_DownloadsInProgress:
 		{
-			*msg->opg_Storage = (ULONG) data->downloads_in_progress;
+			*msg->opg_Storage = (IPTR) data->downloads_in_progress;
 		}
 		return TRUE;
 
 		case MA_OWBApp_HistoryChanged:
 		{
-			*msg->opg_Storage = (ULONG) data->history_changed;
+			*msg->opg_Storage = (IPTR) data->history_changed;
 		}
 		return TRUE;
 
 		case MA_OWBApp_BookmarksChanged:
 		{
-			*msg->opg_Storage = (ULONG) data->bookmarks_changed;
+			*msg->opg_Storage = (IPTR) data->bookmarks_changed;
 		}
 		return TRUE;
 
 		case MA_OWBApp_PrivateBrowsingClients:
 		{
-			*msg->opg_Storage = (ULONG) data->privatebrowsing_clients;
+			*msg->opg_Storage = (IPTR) data->privatebrowsing_clients;
 		}
 		return TRUE;
 	}
@@ -1680,7 +1680,7 @@ static void doset(APTR obj, struct Data *data, struct TagItem *tags)
 
 	while ((tag = NextTagItem(&tstate)) != NULL)
 	{
-		ULONG tdata = tag->ti_Data;
+		IPTR tdata = tag->ti_Data;
 
 		switch (tag->ti_Tag)
 		{
@@ -1900,7 +1900,7 @@ DEFSMETHOD(OWBApp_AddPage)
 		widget = (BalWidget *) DoMethod(app, MM_OWBApp_AddBrowser, msg->window, msg->url, msg->isframe, NULL, msg->donotactivate, msg->privatebrowsing, msg->addtoend);
 	}
 
-	return (ULONG) widget;
+	return (IPTR) widget;
 }
 
 /* Add a new window */
@@ -1969,7 +1969,7 @@ DEFSMETHOD(OWBApp_AddWindow)
 		}
 	}
 
-	return (ULONG) widget;
+	return (IPTR) widget;
 }
 
 /* Remove a window */
@@ -2004,7 +2004,7 @@ DEFSMETHOD(OWBApp_AddBrowser)
 		widget = (BalWidget *) DoMethod(window, MM_OWBWindow_AddBrowser, msg->url, msg->isframe, msg->sourceview, msg->donotactivate, msg->privatebrowsing, msg->addtoend);
 	}
 
-	return (ULONG) widget;
+	return (IPTR) widget;
 }
 
 /* Remove a browser */
@@ -2179,7 +2179,7 @@ DEFSMETHOD(OWBApp_Download)
 		DoMethod(data->dlwin, MUIM_List_InsertSingle, dl, MUIV_List_Insert_Bottom);
 	}
 
-	return (ULONG)dl;
+	return (IPTR)dl;
 }
 
 DEFSMETHOD(OWBApp_DownloadUpdate)
@@ -2646,7 +2646,7 @@ DEFSMETHOD(OWBApp_SaveFormState)
 				{
 					D(kprintf("Valid formdata found for <%s>\n", webFormPasswordData.origin.string().latin1().data()));
 
-					if(getv(app, MA_OWBApp_SaveFormCredentials) && DoMethod(data->passwordmanagerwin, MM_PasswordManagerGroup_Get, &(webFormPasswordData.origin.string())) == NULL)
+					if(getv(app, MA_OWBApp_SaveFormCredentials) && DoMethod(data->passwordmanagerwin, MM_PasswordManagerGroup_Get, &(webFormPasswordData.origin.string())) == (IPTR)NULL)
 					{
 						ExtCredential extCredential(webFormPasswordData.userNameValue,
 													webFormPasswordData.passwordValue,
diff --git Source/WebKit/mui/Api/MorphOS/aros_stuff.c Source/WebKit/mui/Api/MorphOS/aros_stuff.c
index 494b178..fa4dec8 100644
--- Source/WebKit/mui/Api/MorphOS/aros_stuff.c
+++ Source/WebKit/mui/Api/MorphOS/aros_stuff.c
@@ -142,8 +142,13 @@ static void aros_trap_handler(ULONG trapNum, BYTE * p)
     crashlocation = (APTR)*((ULONG*)(p + 48));
     *((ULONG*)(p + 48)) = (ULONG)aros_crash_handler;
 #else
+#if defined (__x86_64__)
+    crashlocation = (APTR)*((IPTR*)(p + 48));
+    *((IPTR*)(p + 48)) = (IPTR)aros_crash_handler;
+#else
 #error program counter setting code missing for your architecture
 #endif
+#endif
 }
 
 void aros_register_trap_handler()
diff --git Source/WebKit/mui/Api/MorphOS/autofillpopupclass.cpp Source/WebKit/mui/Api/MorphOS/autofillpopupclass.cpp
index e643b66..3fe5ba1 100755
--- Source/WebKit/mui/Api/MorphOS/autofillpopupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/autofillpopupclass.cpp
@@ -52,9 +52,9 @@ struct Data
 DEFNEW
 {
 	Object *lv_suggestions;
-	Object *source              = (Object *) GetTagData(MA_AutofillPopup_Source, NULL, msg->ops_AttrList);
-	IntRect *rect               = (IntRect *) GetTagData(MA_AutofillPopup_Rect, NULL, msg->ops_AttrList);
-	Vector<String> *suggestions = (Vector<String> *) GetTagData(MA_AutofillPopup_Suggestions, NULL, msg->ops_AttrList);
+	Object *source              = (Object *) GetTagData(MA_AutofillPopup_Source, (IPTR)NULL, msg->ops_AttrList);
+	IntRect *rect               = (IntRect *) GetTagData(MA_AutofillPopup_Rect, (IPTR)NULL, msg->ops_AttrList);
+	Vector<String> *suggestions = (Vector<String> *) GetTagData(MA_AutofillPopup_Suggestions, (IPTR)NULL, msg->ops_AttrList);
 	struct Rect32 r = { _mleft(source) + rect->x(), _mtop(source) + rect->y() + rect->height(), _mleft(source) + rect->maxX(), _mtop(source) + rect->y() + rect->height() + 100 };
 
 	obj = (Object *) DoSuperNew(cl, obj,
@@ -81,7 +81,7 @@ DEFNEW
 		DoMethod(data->lv_suggestions, MUIM_Notify, MUIA_List_Active, MUIV_EveryTime, obj, 3, MM_AutofillPopup_DidSelect, MUIV_TriggerValue, FALSE);
 		DoMethod(data->lv_suggestions, MUIM_Notify, MUIA_List_DoubleClick, MUIV_EveryTime, obj, 3, MM_AutofillPopup_DidSelect, -1, TRUE);
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
diff --git Source/WebKit/mui/Api/MorphOS/autofillpopuplistclass.cpp Source/WebKit/mui/Api/MorphOS/autofillpopuplistclass.cpp
index f78f429..7202694 100644
--- Source/WebKit/mui/Api/MorphOS/autofillpopuplistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/autofillpopuplistclass.cpp
@@ -52,13 +52,13 @@ DEFNEW
 		TAG_MORE, INITTAGS
 	);
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFMMETHOD(List_Construct)
 {
 	String *entry = (String *) msg->entry;
-	return (ULONG) (new String(*entry));
+	return (IPTR) (new String(*entry));
 }
 
 DEFMMETHOD(List_Destruct)
diff --git Source/WebKit/mui/Api/MorphOS/blockmanagergroupclass.cpp Source/WebKit/mui/Api/MorphOS/blockmanagergroupclass.cpp
index 0b2ae4f..aaf369c 100644
--- Source/WebKit/mui/Api/MorphOS/blockmanagergroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/blockmanagergroupclass.cpp
@@ -77,7 +77,7 @@ static void cycles_init(void)
 		STRPTR *current = (STRPTR *)*ptr;
 		while(*current)
 		{
-			*current = (STRPTR)GSI((ULONG)*current);
+			*current = (STRPTR)GSI((IPTR)*current);
 			current++;
 		}
 		ptr++;
@@ -139,7 +139,7 @@ DEFNEW
 		DoMethod(cy_type, MUIM_Notify, MUIA_Cycle_Active, MUIV_EveryTime, obj, 1, MM_BlockManagerGroup_Change);
 	}
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
diff --git Source/WebKit/mui/Api/MorphOS/blockmanagerlistclass.cpp Source/WebKit/mui/Api/MorphOS/blockmanagerlistclass.cpp
index 510dca3..821ff20 100644
--- Source/WebKit/mui/Api/MorphOS/blockmanagerlistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/blockmanagerlistclass.cpp
@@ -54,7 +54,7 @@ DEFNEW
 		TAG_MORE, INITTAGS
 	);
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -65,7 +65,7 @@ DEFDISP
 DEFMMETHOD(List_Construct)
 {
 	// Built by caller
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
diff --git Source/WebKit/mui/Api/MorphOS/blockmanagerwindowclass.cpp Source/WebKit/mui/Api/MorphOS/blockmanagerwindowclass.cpp
index 2b2b476..920d43f 100644
--- Source/WebKit/mui/Api/MorphOS/blockmanagerwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/blockmanagerwindowclass.cpp
@@ -73,7 +73,7 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_BlockManager;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_BlockManager;
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/bookmarkgroupclass.cpp Source/WebKit/mui/Api/MorphOS/bookmarkgroupclass.cpp
index 78bfec7..6c7ee58 100755
--- Source/WebKit/mui/Api/MorphOS/bookmarkgroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/bookmarkgroupclass.cpp
@@ -43,7 +43,7 @@
 #include "bookmarkgroupclass.h"
 
 #ifndef get
-#define get(obj,attr,store) GetAttr(attr,obj,(ULONGPTR)store)
+#define get(obj,attr,store) GetAttr(attr,obj,(IPTR *)store)
 #endif
 
 #define D(x)
@@ -406,7 +406,7 @@ DEFNEW
 
 	if (!obj)
 	{
-		return (NULL);
+		return (IPTR)NULL;
 	}
 
 	GETDATA;
@@ -502,7 +502,7 @@ DEFNEW
 
 	//data->notifyreq=dosnotify_start(BOOKMARK_PATH) ;
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -799,7 +799,7 @@ DEFSMETHOD(Bookmarkgroup_AddGroup)
 		);
 	}
 
-	D(kprintf("entry is %08lx.\n",(ULONG)entry));
+	D(kprintf("entry is %08lx.\n",(IPTR)entry));
 	
 	set(data->lt_bookmark, MUIA_Listtree_Quiet, FALSE);
 	
@@ -843,7 +843,7 @@ DEFSMETHOD(Bookmarkgroup_AddLink)
 	caddress = newnode.address;
 	calias   = newnode.alias;
 	
-	D(kprintf("AddLink title %s %08lx %08lx\n",msg->title, (ULONG)msg->alias, (ULONG)msg->address));
+	D(kprintf("AddLink title %s %08lx %08lx\n",msg->title, (IPTR)msg->alias, (IPTR)msg->address));
 	
 	if (!msg->external)
 	{
@@ -898,7 +898,7 @@ DEFSMETHOD(Bookmarkgroup_AddLink)
 	free(calias);
 	free(caddress);
 
-	D(kprintf( "entry is %08lx.\n",(ULONG)entry));
+	D(kprintf( "entry is %08lx.\n",(IPTR)entry));
 	set(data->lt_bookmark, MUIA_Listtree_Quiet, FALSE);	
 	if (entry)
 	{
@@ -913,7 +913,7 @@ DEFSMETHOD(Bookmarkgroup_AddLink)
 					obj, 1 | MUIV_PushMethod_Delay(500) | MUIF_PUSHMETHOD_SINGLE,
 					MM_Bookmarkgroup_AutoSave);
 
-		return ((ULONG)entry->tn_User);
+		return ((IPTR)entry->tn_User);
 	}
 	return (0);
 }
@@ -1739,7 +1739,7 @@ DEFSMETHOD(Bookmarkgroup_BuildMenu)
 
 #ifndef MUIM_Family_GetChild
 #define MUIM_Family_GetChild                0x8042c556 /* V20 */
-struct  MUIP_Family_GetChild                { ULONG MethodID; LONG nr; Object *ref; };
+struct  MUIP_Family_GetChild                { STACKED ULONG MethodID; STACKED LONG nr; STACKED Object *ref; };
 #endif
 
 DEFTMETHOD(Bookmarkgroup_UpdateMenu)
diff --git Source/WebKit/mui/Api/MorphOS/bookmarklisttreeclass.cpp Source/WebKit/mui/Api/MorphOS/bookmarklisttreeclass.cpp
index 7c7afe2..17ab97d 100644
--- Source/WebKit/mui/Api/MorphOS/bookmarklisttreeclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/bookmarklisttreeclass.cpp
@@ -96,7 +96,7 @@ MUI_HOOK(bookmarklisttree_constructfunc, APTR pool, APTR t)
 	struct treedata * td;
 	struct treedata * tempnode = (struct treedata *) t;
 
-	//kprintf( "Listtree construct hook title %08lx alias %08lx address %08lx.\n", (ULONG)tempnode->title, (ULONG)tempnode->alias, (ULONG)tempnode->address);
+	//kprintf( "Listtree construct hook title %08lx alias %08lx address %08lx.\n", (ULONG)tempnode->title, (IPTR)tempnode->alias, (IPTR)tempnode->address);
 	if ((td = (struct treedata *) AllocPooled(pool, sizeof(struct treedata))))
 	{
 		td->flags    = tempnode->flags;
@@ -128,7 +128,7 @@ MUI_HOOK(bookmarklisttree_constructfunc, APTR pool, APTR t)
 		}
 	}
 	//kprintf( "End of construct\n");
-	return (ULONG) (td);
+	return (IPTR) (td);
 }
 
 MUI_HOOK(bookmarklisttree_destructfunc, APTR pool, APTR t)
@@ -259,7 +259,7 @@ MUI_HOOK(bookmarklisttree_displayfunc, APTR a, APTR t)
 			array[1] = (td->address) ? td->address : (STRPTR)"";
 		}
 
-		if( (ULONG)array[ -1 ] % 2 )
+		if( (IPTR)array[ -1 ] % 2 )
 		{
 #if !OS(AROS)
 			/* This code overrides internal data structures and causes a crash on AROS */
@@ -308,7 +308,7 @@ DEFNEW
 		data->ehnode.ehn_Flags    = MUI_EHF_GUIMODE;
 
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -380,7 +380,7 @@ DEFGET
 				url = current->address;
 			}
 
-			*msg->opg_Storage = (ULONG) url;
+			*msg->opg_Storage = (IPTR) url;
 		}
 		return TRUE;
 	}
@@ -659,7 +659,7 @@ DEFMMETHOD(ContextMenuBuild)
 		if (item) DoMethod(data->cMenu, MUIM_Family_AddTail, item);
  
 	}
-	return (ULONG)data->cMenu;
+	return (IPTR)data->cMenu;
 }
 
 /***********************************************************************/
@@ -667,7 +667,7 @@ DEFMMETHOD(ContextMenuBuild)
 DEFMMETHOD(ContextMenuChoice)
 {
 	GETDATA;
-	ULONG udata = muiUserData(msg->item);
+	IPTR udata = muiUserData(msg->item);
 	struct treedata *td;
  
 	//kprintf("Bookmark menu trig: %lx\n",udata);
@@ -740,7 +740,7 @@ DEFMMETHOD(ContextMenuChoice)
 			//kprintf("Bad Context menu return\n");
     }
 	data->drop=NULL;
-    return (ULONG)NULL;
+    return (IPTR)NULL;
 }
 
 /*
@@ -748,7 +748,7 @@ DEFMMETHOD(ContextMenuChoice)
  * from nofe different than root. sucky? oh well:)
  */
 
-static APTR tree_iteratefind(Object *lt, struct MUIS_Listtree_TreeNode *list, STRPTR pattern, APTR startnode, ULONG *dosearch)
+static APTR tree_iteratefind(Object *lt, struct MUIS_Listtree_TreeNode *list, STRPTR pattern, APTR startnode, IPTR *dosearch)
 {
 	struct MUIS_Listtree_TreeNode *tn;
 	UWORD pos=0;
@@ -798,7 +798,7 @@ static APTR tree_iteratefind(Object *lt, struct MUIS_Listtree_TreeNode *list, ST
 
 static APTR tree_find(Object *lt, STRPTR pattern, APTR startnode)
 {
-	ULONG dofind = startnode != NULL ? FALSE : TRUE;
+	IPTR dofind = startnode != NULL ? FALSE : TRUE;
 	return tree_iteratefind(lt, MUIV_Listtree_GetEntry_ListNode_Root, pattern, startnode, &dofind);
 }
 
diff --git Source/WebKit/mui/Api/MorphOS/bookmarkpanelgroupclass.cpp Source/WebKit/mui/Api/MorphOS/bookmarkpanelgroupclass.cpp
index b460f17..1b6d64d 100755
--- Source/WebKit/mui/Api/MorphOS/bookmarkpanelgroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/bookmarkpanelgroupclass.cpp
@@ -156,7 +156,7 @@ DEFNEW
 
 	if (!obj)
 	{
-		return (NULL);
+		return (IPTR)NULL;
 	}
 
 	GETDATA;
@@ -173,7 +173,7 @@ DEFNEW
 
 	DoMethod(obj, MM_Bookmarkgroup_LoadHtml, BOOKMARK_PATH);
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -457,7 +457,7 @@ DEFSMETHOD(Bookmarkgroup_AddLink)
 	newnode.iconimg  = NULL;
 	newnode.tree     = data->lt_bookmark;
 
-	D(kprintf("AddLink title %s %08lx %08lx\n",msg->title, (ULONG)msg->alias, (ULONG)msg->address));
+	D(kprintf("AddLink title %s %08lx %08lx\n",msg->title, (IPTR)msg->alias, (IPTR)msg->address));
 
 	if (!msg->external)
 	{
diff --git Source/WebKit/mui/Api/MorphOS/bookmarkwindowclass.cpp Source/WebKit/mui/Api/MorphOS/bookmarkwindowclass.cpp
index e328a6e..cf26071 100755
--- Source/WebKit/mui/Api/MorphOS/bookmarkwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/bookmarkwindowclass.cpp
@@ -59,7 +59,7 @@ DEFNEW
 		DoMethod(obj, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, obj, 3, MUIM_Set, MUIA_Window_Open, FALSE);
 	}
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 DEFGET
@@ -68,7 +68,7 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_Bookmarks;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_Bookmarks;
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/choosetitlegroupclass.cpp Source/WebKit/mui/Api/MorphOS/choosetitlegroupclass.cpp
index 7de9b47..2781fa6 100755
--- Source/WebKit/mui/Api/MorphOS/choosetitlegroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/choosetitlegroupclass.cpp
@@ -44,14 +44,14 @@ struct Data
 	Object *ch_menu;
 	char *url;
 	char *title;
-	ULONG quicklink;
+	IPTR quicklink;
 };
 
 DEFNEW
 {
 	Object *bt_ok, *bt_cancel, *str, *ch_menu;
 
-	char *title = (char *) GetTagData(MA_OWB_Title, NULL, msg->ops_AttrList);
+	char *title = (char *) GetTagData(MA_OWB_Title, (IPTR)NULL, msg->ops_AttrList);
 
 	obj = (Object *) DoSuperNew(cl, obj,
         MUIA_Background, MUII_RequesterBack,
@@ -85,8 +85,8 @@ DEFNEW
 		data->str = str;
 		data->ch_menu = ch_menu;
 		data->title = title;
-		data->url = (char *) GetTagData(MA_OWB_URL, NULL, msg->ops_AttrList),
-		data->quicklink = (ULONG) GetTagData(MA_ChooseTitleGroup_QuickLink, 0, msg->ops_AttrList),
+		data->url = (char *) GetTagData(MA_OWB_URL, (IPTR)NULL, msg->ops_AttrList),
+		data->quicklink = (IPTR) GetTagData(MA_ChooseTitleGroup_QuickLink, 0, msg->ops_AttrList),
 
 		set(data->str, MUIA_CycleChain, 1);
 
@@ -100,7 +100,7 @@ DEFNEW
 				 obj, 1, MM_ChooseTitleGroup_Add);
 	}
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 DEFDISP
@@ -119,7 +119,7 @@ DEFTMETHOD(ChooseTitleGroup_Add)
 
 	if(title)
 	{
-		ULONG addtomenu = getv(data->ch_menu, MUIA_Selected);
+		IPTR addtomenu = getv(data->ch_menu, MUIA_Selected);
 		set(app, MA_OWBApp_Bookmark_AddToMenu, addtomenu);
 
 		DoMethod(app, MM_Bookmarkgroup_AddLink, title, NULL, data->url, TRUE, addtomenu, data->quicklink);
diff --git Source/WebKit/mui/Api/MorphOS/classes.h Source/WebKit/mui/Api/MorphOS/classes.h
index c673218..399c16d 100755
--- Source/WebKit/mui/Api/MorphOS/classes.h
+++ Source/WebKit/mui/Api/MorphOS/classes.h
@@ -18,7 +18,7 @@
 #include <libraries/mui.h>
 #include <proto/muimaster.h>
 
-#define DEFCLASS(s) ULONG create_##s##class(void); \
+#define DEFCLASS(s) IPTR create_##s##class(void); \
 	struct IClass *get##s##class(void); \
 	APTR get##s##classroot(void); \
 	void delete_##s##class(void)
@@ -822,888 +822,888 @@ enum
 /* OWBApp */
 
 struct MP_Search {
-	ULONG MethodID;
-	STRPTR string;
-	ULONG flags;
+	STACKED ULONG MethodID;
+	STACKED STRPTR string;
+	STACKED ULONG flags;
 };
 
 struct MP_OWBApp_DisposeObject {
-	ULONG MethodID;
-	APTR obj;
+	STACKED ULONG MethodID;
+	STACKED APTR obj;
 };
 
 struct MP_OWBApp_DisposeWindow {
-	ULONG MethodID;
-	APTR obj;
+	STACKED ULONG MethodID;
+	STACKED APTR obj;
 };
 
 struct MP_OWBApp_PrefsSave {
-	ULONG MethodID;
-	ULONG SaveENVARC;
+	STACKED ULONG MethodID;
+	STACKED ULONG SaveENVARC;
 };
 
 struct MP_OWBApp_OpenWindow {
-	ULONG MethodID;
-	ULONG window_id;
-	ULONG activate;
+	STACKED ULONG MethodID;
+	STACKED ULONG window_id;
+	STACKED ULONG activate;
 };
 
 struct MP_OWBApp_AddPage {
-	ULONG MethodID;
-	TEXT* url;
-	ULONG isframe;
-	ULONG donotactivate;
-	APTR  windowfeatures;
-	Object *window;
-	ULONG privatebrowsing;
-	ULONG addtoend;
+	STACKED ULONG MethodID;
+	STACKED TEXT* url;
+	STACKED ULONG isframe;
+	STACKED ULONG donotactivate;
+	STACKED APTR  windowfeatures;
+	STACKED Object *window;
+	STACKED ULONG privatebrowsing;
+	STACKED ULONG addtoend;
 };
 
 struct MP_OWBApp_AddWindow {
-	ULONG MethodID;
-	TEXT* url;
-	ULONG isframe;
-	APTR  sourceview;
-	ULONG urlfocus;
-	APTR  windowfeatures;
-	ULONG privatebrowsing;
+	STACKED ULONG MethodID;
+	STACKED TEXT* url;
+	STACKED ULONG isframe;
+	STACKED APTR  sourceview;
+	STACKED ULONG urlfocus;
+	STACKED APTR  windowfeatures;
+	STACKED ULONG privatebrowsing;
 };
 
 struct MP_OWBApp_RemoveWindow {
-	ULONG MethodID;
-	Object *window;
+	STACKED ULONG MethodID;
+	STACKED Object *window;
 };
 
 struct MP_OWBApp_AddBrowser {
-	ULONG MethodID;
-	Object* window;
-	TEXT* url;
-	ULONG isframe;
-	APTR  sourceview;
-	ULONG donotactivate;
-	ULONG privatebrowsing;
-	ULONG addtoend;
+	STACKED ULONG MethodID;
+	STACKED Object* window;
+	STACKED TEXT* url;
+	STACKED ULONG isframe;
+	STACKED APTR  sourceview;
+	STACKED ULONG donotactivate;
+	STACKED ULONG privatebrowsing;
+	STACKED ULONG addtoend;
 };
 
 struct MP_OWBApp_RemoveBrowser {
-	ULONG MethodID;
-	Object* browser;
+	STACKED ULONG MethodID;
+	STACKED Object* browser;
 };
 
 struct MP_OWBApp_Download {
-	ULONG MethodID;
-	STRPTR url;
-	STRPTR suggestedname;
-	APTR webdownload;
+	STACKED ULONG MethodID;
+	STACKED STRPTR url;
+	STACKED STRPTR suggestedname;
+	STACKED APTR webdownload;
 };
 
 struct MP_OWBApp_DownloadDone {
-	ULONG MethodID;
-	APTR entry;
+	STACKED ULONG MethodID;
+	STACKED APTR entry;
 };
 
 struct MP_OWBApp_DownloadError {
-	ULONG MethodID;
-	APTR entry;
-	char *error;
+	STACKED ULONG MethodID;
+	STACKED APTR entry;
+	STACKED char *error;
 };
 
 struct MP_OWBApp_DownloadCancelled {
-	ULONG MethodID;
-	APTR entry;
+	STACKED ULONG MethodID;
+	STACKED APTR entry;
 };
 
 struct MP_OWBApp_DownloadUpdate {
-	ULONG MethodID;
-	APTR entry;
+	STACKED ULONG MethodID;
+	STACKED APTR entry;
 };
 
 struct MP_OWBApp_Login {
-	ULONG MethodID;
-	TEXT *host;
-	TEXT *realm;
-	TEXT **username;
-	TEXT **password;
-	ULONG *persistence;
+	STACKED ULONG MethodID;
+	STACKED TEXT *host;
+	STACKED TEXT *realm;
+	STACKED TEXT **username;
+	STACKED TEXT **password;
+	STACKED ULONG *persistence;
 };
 
 struct MP_OWBApp_SetCredential {
-	ULONG MethodID;
-	APTR host;
-	APTR realm;
-	APTR credential;
+	STACKED ULONG MethodID;
+	STACKED APTR host;
+	STACKED APTR realm;
+	STACKED APTR credential;
 };
 
 struct MP_OWBApp_SetFormState {
-	ULONG MethodID;
-	APTR host;
-	APTR doc;
+	STACKED ULONG MethodID;
+	STACKED APTR host;
+	STACKED APTR doc;
 };
 
 struct MP_OWBApp_SaveFormState {
-	ULONG MethodID;
-	APTR webView;
-	APTR request;
+	STACKED ULONG MethodID;
+	STACKED APTR webView;
+	STACKED APTR request;
 };
 
 struct MP_OWBApp_MailTo {
-	ULONG MethodID;
-	TEXT *url;
+	STACKED ULONG MethodID;
+	STACKED TEXT *url;
 };
 
 struct MP_OWBApp_AddConsoleMessage {
-	ULONG MethodID;
-	STRPTR message;
+	STACKED ULONG MethodID;
+	STACKED STRPTR message;
 };
 
 struct MP_OWBApp_BuildUserMenu
 {
-	ULONG MethodID;
-	int  category;
-	APTR controller;
-	APTR menu;
+	STACKED ULONG MethodID;
+	STACKED int  category;
+	STACKED APTR controller;
+	STACKED APTR menu;
 };
 
 struct MP_OWBApp_SelectUserMenu
 {
-	ULONG MethodID;
-	APTR item;
-	APTR menucontroller;
+	STACKED ULONG MethodID;
+	STACKED APTR item;
+	STACKED APTR menucontroller;
 };
 
 struct MP_OWBApp_CanShowMediaMimeType
 {
-	ULONG MethodID;
-	STRPTR mimetype;
+	STACKED ULONG MethodID;
+	STACKED STRPTR mimetype;
 };
 
 struct MP_OWBApp_RequestPolicyForMimeType
 {
-	ULONG MethodID;
-        APTR response;
-	APTR request;
-	APTR webview;
-	APTR webframe;
-	APTR listener;
+	STACKED ULONG MethodID;
+        STACKED APTR response;
+	STACKED APTR request;
+	STACKED APTR webview;
+	STACKED APTR webframe;
+	STACKED APTR listener;
 };
 
 struct MP_OWBApp_ProcessResourceClientAction {
-	ULONG MethodID;
-	ULONG action;
-	APTR client;
-	APTR job;
-	APTR response;
-	APTR data;
-	int	totalsize;
-	APTR redirectedrequest;
-	APTR resourceerror;
-	APTR authenticationchallenge;
+	STACKED ULONG MethodID;
+	STACKED IPTR action;
+	STACKED APTR client;
+	STACKED APTR job;
+	STACKED APTR response;
+	STACKED APTR data;
+	STACKED int	totalsize;
+	STACKED APTR redirectedrequest;
+	STACKED APTR resourceerror;
+	STACKED APTR authenticationchallenge;
 };
 
 struct MP_OWBApp_RestoreSession {
-	ULONG MethodID;
-	ULONG ask;
-	ULONG selectfile;
+	STACKED ULONG MethodID;
+	STACKED ULONG ask;
+	STACKED ULONG selectfile;
 };
 
 struct MP_OWBApp_SaveSession {
-	ULONG MethodID;
-	ULONG selectfile;
+	STACKED ULONG MethodID;
+	STACKED ULONG selectfile;
 };
 
 /* OWBWindow */
 struct MP_OWBWindow_AddBrowser {
-	ULONG MethodID;
-	TEXT* url;
-	ULONG isframe;
-	APTR  sourceview;
-	ULONG donotactivate;
-	ULONG privatebrowsing;
-	ULONG addtoend;
+	STACKED ULONG MethodID;
+	STACKED TEXT* url;
+	STACKED ULONG isframe;
+	STACKED APTR  sourceview;
+	STACKED ULONG donotactivate;
+	STACKED ULONG privatebrowsing;
+	STACKED ULONG addtoend;
 };
 
 struct MP_OWBWindow_RemoveBrowser {
-	ULONG MethodID;
-	Object* browser;
+	STACKED ULONG MethodID;
+	STACKED Object* browser;
 };
 
 struct MP_OWBWindow_DetachBrowser {
-	ULONG MethodID;
-	Object* browser;
-	Object* window;
+	STACKED ULONG MethodID;
+	STACKED Object* browser;
+	STACKED Object* window;
 };
 
 struct MP_OWBWindow_TransferBrowser {
-	ULONG MethodID;
-	Object* browser;
+	STACKED ULONG MethodID;
+	STACKED Object* browser;
 };
 
 struct MP_OWBWindow_ActivePage {
-	ULONG MethodID;
-	ULONG pagenum;
+	STACKED ULONG MethodID;
+	STACKED ULONG pagenum;
 };
 
 struct MP_OWBWindow_CreateInspector {
-	ULONG MethodID;
-	Object* browser;
+	STACKED ULONG MethodID;
+	STACKED Object* browser;
 };
 
 struct MP_OWBWindow_DestroyInspector {
-	ULONG MethodID;
-	Object* browser;
+	STACKED ULONG MethodID;
+	STACKED Object* browser;
 };
 
 struct MP_OWBWindow_LoadURL {
-	ULONG MethodID;
-	TEXT* url;
-	APTR browser;
+	STACKED ULONG MethodID;
+	STACKED TEXT* url;
+	STACKED APTR browser;
 };
 
 struct MP_OWBWindow_Reload {
-	ULONG MethodID;
-	Object* browser;
+	STACKED ULONG MethodID;
+	STACKED Object* browser;
 };
 
 struct MP_OWBWindow_MenuAction {
-	ULONG MethodID;
-	ULONG action;
+	STACKED ULONG MethodID;
+	STACKED IPTR action;
 };
 
 struct MP_OWBWindow_UpdateTitle {
-	ULONG MethodID;
-	APTR browser;
-	TEXT* title;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
+	STACKED TEXT* title;
 };
 
 struct MP_OWBWindow_UpdateStatus {
-	ULONG MethodID;
-	APTR browser;
-	TEXT *status;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
+	STACKED TEXT *status;
 };
 
 struct MP_OWBWindow_UpdateURL {
-	ULONG MethodID;
-	APTR browser;
-	TEXT *url;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
+	STACKED TEXT *url;
 };
 
 struct MP_OWBWindow_UpdateNavigation {
-	ULONG MethodID;
-	APTR browser;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
 };
 
 struct MP_OWBWindow_UpdateProgress {
-	ULONG MethodID;
-	APTR browser;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
 };
 
 struct MP_OWBWindow_UpdateState {
-	ULONG MethodID;
-	APTR browser;
-	ULONG state;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
+	STACKED ULONG state;
 };
 
 struct MP_OWBWindow_UpdateZone {
-	ULONG MethodID;
-	APTR browser;
-	ULONG zone;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
+	STACKED ULONG zone;
 };
 
 struct MP_OWBWindow_UpdateSecurity {
-	ULONG MethodID;
-	APTR browser;
-	ULONG security;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
+	STACKED ULONG security;
 };
 
 struct MP_OWBWindow_UpdatePrivateBrowsing {
-	ULONG MethodID;
-	APTR browser;
-	ULONG enabled;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
+	STACKED ULONG enabled;
 };
 
 struct MP_OWBWindow_UpdateUserScript {
-	ULONG MethodID;
-	APTR browser;
-	STRPTR url;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
+	STACKED STRPTR url;
 };
 
 struct MP_OWBWindow_UpdateMenu {
-	ULONG MethodID;
-	APTR browser;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
 };
 
 struct MP_OWBWindow_AddClosedView {
-	ULONG MethodID;
-	APTR browser;
+	STACKED ULONG MethodID;
+	STACKED APTR browser;
 };
 
 struct MP_OWBWindow_AddHistoryItem {
-	ULONG MethodID;
-	APTR item;
+	STACKED ULONG MethodID;
+	STACKED APTR item;
 };
 
 struct MP_OWBWindow_Find {
-	ULONG MethodID;
-	STRPTR string;
-	ULONG flags;
+	STACKED ULONG MethodID;
+	STACKED STRPTR string;
+	STACKED ULONG flags;
 };
 
 struct MP_OWBWindow_InsertBookmarkAskTitle {
-	ULONG MethodID;
-	STRPTR url;
-	STRPTR title;
-	ULONG quicklink;
+	STACKED ULONG MethodID;
+	STACKED STRPTR url;
+	STACKED STRPTR title;
+	STACKED ULONG quicklink;
 };
 
 struct MP_OWBWindow_JavaScriptPrompt {
-	ULONG MethodID;
-	STRPTR message;
-	STRPTR defaultvalue;
+	STACKED ULONG MethodID;
+	STACKED STRPTR message;
+	STACKED STRPTR defaultvalue;
 };
 
 struct MP_OWBWindow_AutoComplete {
-	ULONG MethodID;
-	LONG len;
-	LONG prevlen;
+	STACKED ULONG MethodID;
+	STACKED LONG len;
+	STACKED LONG prevlen;
 };
 
 struct MP_OWBWindow_FullScreen {
-	ULONG MethodID;
-	ULONG fullscreen;
+	STACKED ULONG MethodID;
+	STACKED ULONG fullscreen;
 };
 
 /* OWBBrowser */
 
 struct MP_OWBBrowser_Expose {
-	ULONG MethodID;
-	ULONG updatecontrols;
+	STACKED ULONG MethodID;
+	STACKED ULONG updatecontrols;
 };
 
 struct MP_OWBBrowser_Update {
-	ULONG MethodID;
-	APTR rect;
-	ULONG sync;
+	STACKED ULONG MethodID;
+	STACKED APTR rect;
+	STACKED ULONG sync;
 };
 
 struct MP_OWBBrowser_Scroll {
-	ULONG MethodID;
-	int dx;
-	int dy;
-	APTR rect;
+	STACKED ULONG MethodID;
+	STACKED int dx;
+	STACKED int dy;
+	STACKED APTR rect;
 };
 
 struct MP_OWBBrowser_DidStartProvisionalLoad {
-	ULONG MethodID;
-	APTR webframe;
+	STACKED ULONG MethodID;
+	STACKED APTR webframe;
 };
 
 struct MP_OWBBrowser_DidCommitLoad {
-	ULONG MethodID;
-	APTR webframe;
+	STACKED ULONG MethodID;
+	STACKED APTR webframe;
 };
 
 struct MP_OWBBrowser_WillCloseFrame {
-	ULONG MethodID;
-	APTR webframe;
+	STACKED ULONG MethodID;
+	STACKED APTR webframe;
 };
 
 struct MP_OWBBrowser_PopupMenu {
-	ULONG MethodID;
-	APTR popupinfo;
+	STACKED ULONG MethodID;
+	STACKED APTR popupinfo;
 };
 
 struct MP_OWBBrowser_Autofill_ShowPopup {
-	ULONG MethodID;
-	APTR suggestions;
-	APTR rect;
+	STACKED ULONG MethodID;
+	STACKED APTR suggestions;
+	STACKED APTR rect;
 };
 
 struct MP_OWBBrowser_Autofill_HidePopup {
-	ULONG MethodID;
+	STACKED ULONG MethodID;
 };
 
 struct MP_OWBBrowser_Autofill_DidSelect {
-	ULONG MethodID;
-	APTR value;
+	STACKED ULONG MethodID;
+	STACKED APTR value;
 };
 
 struct MP_OWBBrowser_Autofill_SaveTextFields {
-	ULONG MethodID;
-	APTR form;
+	STACKED ULONG MethodID;
+	STACKED APTR form;
 };
 
 struct MP_OWBBrowser_Autofill_DidChangeInTextField {
-	ULONG MethodID;
-	APTR element;
+	STACKED ULONG MethodID;
+	STACKED APTR element;
 };
 
 struct MP_OWBBrowser_Autofill_HandleNavigationEvent {
-	ULONG MethodID;
-	APTR event;
+	STACKED ULONG MethodID;
+	STACKED APTR event;
 };
 
 struct MP_OWBBrowser_ColorChooser_ShowPopup {
-	ULONG MethodID;
-	APTR client;
-	APTR color;
+	STACKED ULONG MethodID;
+	STACKED APTR client;
+	STACKED APTR color;
 };
 
 struct MP_OWBBrowser_ColorChooser_HidePopup {
-	ULONG MethodID;
+	STACKED ULONG MethodID;
 };
 
 struct MP_OWBBrowser_DateTimeChooser_ShowPopup {
-	ULONG MethodID;
-	APTR client;
+	STACKED ULONG MethodID;
+	STACKED APTR client;
 };
 
 struct MP_OWBBrowser_DateTimeChooser_HidePopup {
-	ULONG MethodID;
+	STACKED ULONG MethodID;
 };
 
 struct MP_OWBBrowser_Print {
-	ULONG MethodID;
-	STRPTR file;
-	ULONG headerheight;
-	ULONG footerheight;
-	APTR scalefactor; // ptr to double
-	ULONG mode;
+	STACKED ULONG MethodID;
+	STACKED STRPTR file;
+	STACKED ULONG headerheight;
+	STACKED ULONG footerheight;
+	STACKED APTR scalefactor; // ptr to double
+	STACKED ULONG mode;
 };
 
 struct MP_OWBBrowser_SetScrollOffset {
-	ULONG MethodID;
-	LONG x;
-	LONG y;
+	STACKED ULONG MethodID;
+	STACKED LONG x;
+	STACKED LONG y;
 };
 
 struct MP_OWBBrowser_VideoEnterFullPage {
-	ULONG MethodID;
-	APTR element;
-	ULONG fullscreen;
+	STACKED ULONG MethodID;
+	STACKED APTR element;
+	STACKED ULONG fullscreen;
 };
 
 struct MP_OWBBrowser_VideoBlit {
-	ULONG MethodID;
-	unsigned char **src;
-	int *stride;
-	int	width;
-	int height;
+	STACKED ULONG MethodID;
+	STACKED unsigned char **src;
+	STACKED int *stride;
+	STACKED int	width;
+	STACKED int height;
 };
 
 /* AddressBarGroup */
 
 struct MP_AddressBarGroup_Mark {
-	ULONG MethodID;
-	STRPTR url;
+	STACKED ULONG MethodID;
+	STACKED STRPTR url;
 };
 
 struct MP_AddressBarGroup_CompleteString {
-	ULONG MethodID;
-	STRPTR url;
-	ULONG cursorpos;
-	ULONG markstart;
-	ULONG markend;
+	STACKED ULONG MethodID;
+	STACKED STRPTR url;
+	STACKED ULONG cursorpos;
+	STACKED ULONG markstart;
+	STACKED ULONG markend;
 };
 
 /* SearchBarGroup */
 
 struct MP_SearchBarGroup_LoadURLFromShortcut {
-	ULONG MethodID;
-	STRPTR shortcut;
-	STRPTR string;
+	STACKED ULONG MethodID;
+	STACKED STRPTR shortcut;
+	STACKED STRPTR string;
 };
 
 /* Download */
 struct MP_Download_Done {
-	ULONG MethodID;
-	APTR entry;
+	STACKED ULONG MethodID;
+	STACKED APTR entry;
 };
 
 struct MP_Download_Error {
-	ULONG MethodID;
-	APTR entry;
-	char *error;
+	STACKED ULONG MethodID;
+	STACKED APTR entry;
+	STACKED char *error;
 };
 
 struct MP_Download_Cancelled {
-	ULONG MethodID;
-	APTR entry;
+	STACKED ULONG MethodID;
+	STACKED APTR entry;
 };
 
 struct MP_Download_RemoveEntry {
-	ULONG MethodID;
-	APTR listview;
-	LONG all;
+	STACKED ULONG MethodID;
+	STACKED APTR listview;
+	STACKED LONG all;
 };
 
 struct MP_Download_Cancel {
-	ULONG MethodID;
-	LONG all;
+	STACKED ULONG MethodID;
+	STACKED LONG all;
 };
 
 struct MP_Download_Retry {
-	ULONG MethodID;
-	APTR listview;
+	STACKED ULONG MethodID;
+	STACKED APTR listview;
 };
 
 struct MP_Download_HilightPage {
-	ULONG MethodID;
-	ULONG pagenum;
+	STACKED ULONG MethodID;
+	STACKED ULONG pagenum;
 };
 
 struct MP_Download_UnhilightPage {
-	ULONG MethodID;
-	ULONG pagenum;
+	STACKED ULONG MethodID;
+	STACKED ULONG pagenum;
 };
 
 /* FindText */
 struct MP_FindText_DisableButtons {
-	ULONG MethodID;
-	LONG prev;
-	LONG next;
+	STACKED ULONG MethodID;
+	STACKED LONG prev;
+	STACKED LONG next;
 };
 
 struct MP_FindText_Find {
-	ULONG MethodID;
-	STRPTR string;
-	ULONG flags;
-	ULONG validate;
+	STACKED ULONG MethodID;
+	STACKED STRPTR string;
+	STACKED ULONG flags;
+	STACKED ULONG validate;
 };
 
 /* PopString */
 struct MP_PopString_Insert {
-	ULONG MethodID;
-	TEXT* txt;
+	STACKED ULONG MethodID;
+	STACKED TEXT* txt;
 };
 
 struct MP_FontFamilyPopString_InsertFamily {
-	ULONG MethodID;
-	TEXT* txt;
+	STACKED ULONG MethodID;
+	STACKED TEXT* txt;
 };
 
 /* HistoryList */
 struct MP_HistoryList_Redraw {
-	ULONG MethodID;
-	APTR entry;
+	STACKED ULONG MethodID;
+	STACKED APTR entry;
 };
 
 /* Bookmark */
 struct MP_Bookmarkgroup_Update  {
-	ULONG MethodID;
-	ULONG from;
+	STACKED ULONG MethodID;
+	STACKED ULONG from;
 };
 
 struct MP_Bookmarkgroup_AddLink {
-	ULONG MethodID;
-	TEXT* title;
-	TEXT* alias;
-	TEXT* address;
-	ULONG external;
-	ULONG menu;
-	ULONG quicklink;
+	STACKED ULONG MethodID;
+	STACKED TEXT* title;
+	STACKED TEXT* alias;
+	STACKED TEXT* address;
+	STACKED ULONG external;
+	STACKED ULONG menu;
+	STACKED ULONG quicklink;
 };
 
 struct MP_Bookmarkgroup_AddGroup {
-	ULONG MethodID;
-	TEXT* title;
+	STACKED ULONG MethodID;
+	STACKED TEXT* title;
 };
 
 struct MP_Bookmarkgroup_LoadHtml {
-	LONG MethodID;
-	TEXT* file;
+	STACKED ULONG MethodID;
+	STACKED TEXT* file;
 };
 
 struct MP_Bookmarkgroup_SaveHtml {
-	LONG MethodID;
-	TEXT* file;
-	ULONG type;
+	STACKED ULONG MethodID;
+	STACKED TEXT* file;
+	STACKED ULONG type;
 };
 
 struct MP_Bookmarkgroup_BuildMenu {
-	LONG MethodID;
-	Object *menu;
+	STACKED ULONG MethodID;
+	STACKED Object *menu;
 };
 
 struct MP_Bookmarkgroup_RegisterQLGroup {
-	LONG MethodID;
-	Object *group;
-	Object *parent;
+	STACKED ULONG MethodID;
+	STACKED Object *group;
+	STACKED Object *parent;
 };
 
 struct MP_Bookmarkgroup_UnRegisterQLGroup {
-	LONG MethodID;
-	Object *group;
+	STACKED ULONG MethodID;
+	STACKED Object *group;
 };
 
 struct MP_Bookmarkgroup_AddQuickLink {
-	LONG MethodID;
-	struct treedata *node;
-	LONG	pos;
+	STACKED ULONG MethodID;
+	STACKED struct treedata *node;
+	STACKED LONG	pos;
 };
 
 struct MP_Bookmarkgroup_RemoveQuickLink {
-	LONG MethodID;
-	struct treedata *node;
+	STACKED ULONG MethodID;
+	STACKED struct treedata *node;
 };
 
 struct MP_Bookmarkgroup_ContainsURL {
-	LONG MethodID;
-	void *url;
+	STACKED ULONG MethodID;
+	STACKED void *url;
 };
 
 /* QuickLinkButtonGroup */
 struct MP_QuickLinkButtonGroup_RedrawMenuItem {
-	LONG MethodID;
-	APTR obj;
+	STACKED ULONG MethodID;
+	STACKED APTR obj;
 };
 
 /* QuickLinkGroup */
 struct MP_QuickLinkGroup_Add {
-	LONG MethodID;
-    struct treedata *td;
+	STACKED ULONG MethodID;
+    STACKED struct treedata *td;
 };
 
 struct MP_QuickLinkGroup_Remove {
-	LONG MethodID;
-    struct treedata *td;
+	STACKED ULONG MethodID;
+    STACKED struct treedata *td;
 };
 
 struct MP_QuickLinkGroup_Update {
-	LONG MethodID;
-    struct treedata *td;
+	STACKED ULONG MethodID;
+    STACKED struct treedata *td;
 };
 
 struct MP_QuickLinkGroup_InitChange {
-	LONG MethodID;
-	ULONG mode;
+	STACKED ULONG MethodID;
+	STACKED ULONG mode;
 };
 
 struct MP_QuickLinkGroup_ExitChange {
-	LONG MethodID;
-	ULONG mode;
+	STACKED ULONG MethodID;
+	STACKED ULONG mode;
 };
 
 /* NetworkLedsGroup */
 struct MP_Network_AddJob {
-	LONG MethodID;
-	APTR job;
+	STACKED ULONG MethodID;
+	STACKED APTR job;
 };
 
 struct MP_Network_UpdateJob {
-	LONG MethodID;
-	APTR job;
+	STACKED ULONG MethodID;
+	STACKED APTR job;
 };
 
 struct MP_Network_RemoveJob {
-	LONG MethodID;
-	APTR job;
+	STACKED ULONG MethodID;
+	STACKED APTR job;
 };
 
 /* NetworkWindow */
 struct MP_NetworkWindow_Cancel {
-	LONG MethodID;
-	LONG all;
+	STACKED ULONG MethodID;
+	STACKED LONG all;
 };
 
 /* LoginWindow */
 struct MP_LoginWindow_Login {
-	LONG MethodID;
-	ULONG validate;
+	STACKED ULONG MethodID;
+	STACKED ULONG validate;
 };
 
 /* SplashWindow */
 struct MP_SplashWindow_Update {
-	LONG MethodID;
-	int current;
-	int total;
-	TEXT* file;
+	STACKED ULONG MethodID;
+	STACKED int current;
+	STACKED int total;
+	STACKED TEXT* file;
 };
 
 /* ConsoleWindow */
 struct MP_ConsoleWindow_Add {
-	ULONG MethodID;
-	STRPTR message;
+	STACKED ULONG MethodID;
+	STACKED STRPTR message;
 };
 
 /* FavIcon */
 struct MP_FavIcon_DidReceiveFavIcon {
-	ULONG MethodID;
-	STRPTR url;
+	STACKED ULONG MethodID;
+	STACKED STRPTR url;
 };
 
 /* History */
 struct MP_History_Insert {
-	ULONG MethodID;
-	APTR item;
+	STACKED ULONG MethodID;
+	STACKED APTR item;
 };
 
 struct MP_History_Remove {
-	ULONG MethodID;
-	APTR item;
+	STACKED ULONG MethodID;
+	STACKED APTR item;
 };
 
 struct MP_History_ContainsURL {
-	LONG MethodID;
-	void *url;
+	STACKED ULONG MethodID;
+	STACKED void *url;
 };
 
 /* Password Manager */
 struct MP_PasswordManagerGroup_Insert {
-	ULONG MethodID;
-	APTR host;
-	APTR credential;
+	STACKED ULONG MethodID;
+	STACKED APTR host;
+	STACKED APTR credential;
 };
 
 struct MP_PasswordManagerGroup_Remove {
-	ULONG MethodID;
-	APTR host;
+	STACKED ULONG MethodID;
+	STACKED APTR host;
 };
 
 struct MP_PasswordManagerGroup_Get {
-	ULONG MethodID;
-	APTR host;
+	STACKED ULONG MethodID;
+	STACKED APTR host;
 };
 
 /* Cookie Manager */
 struct MP_CookieManagerGroup_DidInsert {
-	ULONG MethodID;
-	APTR cookie;
+	STACKED ULONG MethodID;
+	STACKED APTR cookie;
 };
 
 struct MP_CookieManagerGroup_DidRemove {
-	ULONG MethodID;
-	APTR cookie;
+	STACKED ULONG MethodID;
+	STACKED APTR cookie;
 };
 
 struct MP_CookieManagerGroup_Remove {
-	ULONG MethodID;
+	STACKED ULONG MethodID;
 };
 
 /* Block Manager */
 struct MP_BlockManagerGroup_DidInsert {
-	ULONG MethodID;
-	STRPTR rule;
-	int type;
-	APTR ptr;
+	STACKED ULONG MethodID;
+	STACKED STRPTR rule;
+	STACKED int type;
+	STACKED APTR ptr;
 };
 
 /* Script Manager */
 struct MP_ScriptManagerGroup_InjectScripts {
-	ULONG MethodID;
-	APTR webView;
+	STACKED ULONG MethodID;
+	STACKED APTR webView;
 };
 
 struct MP_ScriptManagerGroup_ScriptsForURL {
-	ULONG MethodID;
-	STRPTR url;
+	STACKED ULONG MethodID;
+	STACKED STRPTR url;
 };
 
 struct MP_ScriptManagerGroup_Update {
-	ULONG MethodID;
-	ULONG which;
+	STACKED ULONG MethodID;
+	STACKED ULONG which;
 };
 
 /* URLPrefsGroup */
 struct MP_URLPrefsGroup_ApplySettingsForURL {
-	ULONG MethodID;
-	STRPTR url;
-	APTR webView;
+	STACKED ULONG MethodID;
+	STACKED STRPTR url;
+	STACKED APTR webView;
 };
 
 struct MP_URLPrefsGroup_MatchesURL {
-	ULONG MethodID;
-	STRPTR url;
+	STACKED ULONG MethodID;
+	STACKED STRPTR url;
 };
 
 struct MP_URLPrefsGroup_UserAgentForURL {
-	ULONG MethodID;
-	STRPTR url;
-	APTR webView;
+	STACKED ULONG MethodID;
+	STACKED STRPTR url;
+	STACKED APTR webView;
 };
 
 struct MP_URLPrefsGroup_CookiePolicyForURLAndName {
-	ULONG MethodID;
-	STRPTR url;
-	STRPTR name;
+	STACKED ULONG MethodID;
+	STACKED STRPTR url;
+	STACKED STRPTR name;
 };
 
 /* SuggestPopString */
 struct MP_SuggestPopString_Insert {
-	ULONG MethodID;
-	APTR item;
+	STACKED ULONG MethodID;
+	STACKED APTR item;
 };
 
 /* PrinterWindow */
 struct MP_PrinterWindow_PrintDocument {
-	ULONG MethodID;
-	APTR frame;
+	STACKED ULONG MethodID;
+	STACKED APTR frame;
 };
 
 /* AutofillPopup */
 struct MP_AutofillPopup_Update {
-	ULONG MethodID;
-	void *suggestions;
+	STACKED ULONG MethodID;
+	STACKED void *suggestions;
 };
 
 struct MP_AutofillPopup_DidSelect {
-	ULONG MethodID;
-	LONG idx;
-	ULONG close;
+	STACKED ULONG MethodID;
+	STACKED LONG idx;
+	STACKED ULONG close;
 };
 
 struct MP_AutofillPopup_HandleNavigationEvent {
-	ULONG MethodID;
-	LONG event;
+	STACKED ULONG MethodID;
+	STACKED LONG event;
 };
 
 /* ColorChooserPopup */
 struct MP_ColorChooserPopup_DidSelect {
-	ULONG MethodID;
-	ULONG close;
+	STACKED ULONG MethodID;
+	STACKED ULONG close;
 };
 
 /* DateTimeChooserPopup */
 struct MP_DateTimeChooserPopup_DidSelect {
-	ULONG MethodID;
-	ULONG close;
+	STACKED ULONG MethodID;
+	STACKED ULONG close;
 };
 
 /* Plugins */
 
 struct MP_Plugin_RenderRastPort {
-	ULONG MethodID;
-	void* rect;
-	void* windowrect;
-	APTR src;
-	ULONG stride;
+	STACKED ULONG MethodID;
+	STACKED void* rect;
+	STACKED void* windowrect;
+	STACKED APTR src;
+	STACKED ULONG stride;
 };
 
 struct MP_Plugin_AddTimeOut {
-	ULONG MethodID;
-	LONG delay;
-	APTR timeoutfunc;
-	APTR instance;
+	STACKED ULONG MethodID;
+	STACKED LONG delay;
+	STACKED APTR timeoutfunc;
+	STACKED APTR instance;
 };
 
 struct MP_Plugin_RemoveTimeOut {
-	ULONG MethodID;
-	APTR timer;
+	STACKED ULONG MethodID;
+	STACKED APTR timer;
 };
 
 struct MP_Plugin_AddIDCMPHandler {
-	ULONG MethodID;
-	APTR  handlerfunc;
-	APTR  instance;
+	STACKED ULONG MethodID;
+	STACKED APTR  handlerfunc;
+	STACKED APTR  instance;
 };
 
 struct MP_Plugin_RemoveIDCMPHandler {
-	ULONG MethodID;
-	APTR instance;
+	STACKED ULONG MethodID;
+	STACKED APTR instance;
 };
 
 struct MP_Plugin_Message {
-	ULONG MethodID;
-	STRPTR message;
+	STACKED ULONG MethodID;
+	STACKED STRPTR message;
 };
 
 /* Variables */
diff --git Source/WebKit/mui/Api/MorphOS/clipboard.cpp Source/WebKit/mui/Api/MorphOS/clipboard.cpp
index 8eadae7..2a103ff 100644
--- Source/WebKit/mui/Api/MorphOS/clipboard.cpp
+++ Source/WebKit/mui/Api/MorphOS/clipboard.cpp
@@ -62,7 +62,7 @@ bool copyTextToClipboard(char *text, bool utf8)
 			{
 				if (ClipboardHandle *ch = OpenClipboard(PRIMARY_CLIP))
 				{
-		            ih->iff_Stream = (uint32)ch;
+		            ih->iff_Stream = (IPTR)ch;
 		            InitIFFasClip(ih);
 
 					if (0 == OpenIFF(ih, IFFF_WRITE))
@@ -147,7 +147,7 @@ WTF::String pasteFromClipboard(void)
 	{
 		if (ClipboardHandle *ch = OpenClipboard(PRIMARY_CLIP))
 		{
-            ih->iff_Stream = (uint32)ch;
+            ih->iff_Stream = (IPTR)ch;
             InitIFFasClip(ih);
 
 			if (0 == OpenIFF(ih, IFFF_READ))
@@ -435,7 +435,7 @@ static long putbody( struct IFFHandle  *iff,
 
     /* Write out a BODY chunk header */
 
-	if ( (error = PushChunk( iff, NULL, ID_BODY, IFFSIZE_UNKNOWN ) ) )
+	if ( (error = PushChunk( iff, (IPTR)NULL, ID_BODY, IFFSIZE_UNKNOWN ) ) )
 	{
 		free( planarData );
 		return ( error );
@@ -575,7 +575,7 @@ bool copyImageToClipboard(ChkImage *img)
 
 	if((MyHandle = AllocIFF()))
     {
-		if((MyHandle->iff_Stream = (ULONG) OpenClipboard(0)))
+		if((MyHandle->iff_Stream = (IPTR) OpenClipboard(0)))
         {
 			InitIFFasClip(MyHandle);
 			result = WriteIFF(MyHandle, img, fname) != FALSE;
diff --git Source/WebKit/mui/Api/MorphOS/colorchooserpopupclass.cpp Source/WebKit/mui/Api/MorphOS/colorchooserpopupclass.cpp
index 29c10f5..a58528c 100755
--- Source/WebKit/mui/Api/MorphOS/colorchooserpopupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/colorchooserpopupclass.cpp
@@ -55,9 +55,9 @@ struct Data
 
 DEFNEW
 {
-	Object *source                     = (Object *) GetTagData(MA_ColorChooserPopup_Source, NULL, msg->ops_AttrList);
-	ColorChooserController *controller = (ColorChooserController *) GetTagData(MA_ColorChooserPopup_Controller, NULL, msg->ops_AttrList);
-	Color *color                       = (Color *) GetTagData(MA_ColorChooserPopup_InitialColor, NULL, msg->ops_AttrList);
+	Object *source                     = (Object *) GetTagData(MA_ColorChooserPopup_Source, (IPTR)NULL, msg->ops_AttrList);
+	ColorChooserController *controller = (ColorChooserController *) GetTagData(MA_ColorChooserPopup_Controller, (IPTR)NULL, msg->ops_AttrList);
+	Color *color                       = (Color *) GetTagData(MA_ColorChooserPopup_InitialColor, (IPTR)NULL, msg->ops_AttrList);
 
 	if(controller)
 	{
@@ -94,7 +94,7 @@ DEFNEW
 		}
 	}
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
diff --git Source/WebKit/mui/Api/MorphOS/consolelistclass.cpp Source/WebKit/mui/Api/MorphOS/consolelistclass.cpp
index 2abf5b9..ddc74c7 100755
--- Source/WebKit/mui/Api/MorphOS/consolelistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/consolelistclass.cpp
@@ -71,7 +71,7 @@ DEFNEW
 		GETDATA;
 		data->cmenu=NULL;
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -86,7 +86,7 @@ DEFDISP
 
 DEFMMETHOD(List_Construct)
 {
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
@@ -132,7 +132,7 @@ DEFMMETHOD(ContextMenuBuild)
 
 	if (DoMethod(obj, MUIM_List_TestPos, msg->mx, msg->my, &res) && (res.entry != -1))
 	{
-		DoMethod(obj, MUIM_List_GetEntry, res.entry, (ULONG *)&ce);
+		DoMethod(obj, MUIM_List_GetEntry, res.entry, (IPTR *)&ce);
 
 		if(ce)
 		{
@@ -146,18 +146,18 @@ DEFMMETHOD(ContextMenuBuild)
 	            End;
 		}
 	}
-	return (ULONG)data->cmenu;
+	return (IPTR)data->cmenu;
 }
 
 DEFMMETHOD(ContextMenuChoice)
 {
 	struct console_entry *ce;
 
-	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (ULONG *)&ce);
+	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (IPTR *)&ce);
 
 	if(ce)
 	{
-		ULONG udata = muiUserData(msg->item);
+		IPTR udata = muiUserData(msg->item);
 
 		switch(udata)
 		{
diff --git Source/WebKit/mui/Api/MorphOS/consolewindowclass.cpp Source/WebKit/mui/Api/MorphOS/consolewindowclass.cpp
index eb3e12d..ecc5ca2 100755
--- Source/WebKit/mui/Api/MorphOS/consolewindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/consolewindowclass.cpp
@@ -86,7 +86,7 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_Console;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_Console;
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/contextmenugroupclass.cpp Source/WebKit/mui/Api/MorphOS/contextmenugroupclass.cpp
index 10998ef..ecf5773 100755
--- Source/WebKit/mui/Api/MorphOS/contextmenugroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/contextmenugroupclass.cpp
@@ -40,7 +40,7 @@
 #include "utils.h"
 
 #ifndef get
-#define get(obj,attr,store) GetAttr(attr,obj,(ULONGPTR)store)
+#define get(obj,attr,store) GetAttr(attr,obj,(IPTR *)store)
 #endif
 
 using namespace WebCore;
@@ -104,7 +104,7 @@ static void cycles_init(void)
 		STRPTR *current = (STRPTR *)*ptr;
 		while(*current)
 		{
-			*current = (STRPTR)GSI((ULONG)*current);
+			*current = (STRPTR)GSI((IPTR)*current);
 			current++;
 		}
 		ptr++;
diff --git Source/WebKit/mui/Api/MorphOS/contextmenulistclass.cpp Source/WebKit/mui/Api/MorphOS/contextmenulistclass.cpp
index 58b7483..49e0672 100755
--- Source/WebKit/mui/Api/MorphOS/contextmenulistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/contextmenulistclass.cpp
@@ -53,12 +53,12 @@ DEFNEW
 		TAG_MORE, INITTAGS
 	);
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFMMETHOD(List_Construct)
 {
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
@@ -106,7 +106,7 @@ DEFMMETHOD(List_Display)
 		msg->array[2] = commandType;
 		msg->array[3] = cn->commandString;
 
-		if( (ULONG)msg->array[-1] % 2 )
+		if( (IPTR)msg->array[-1] % 2 )
 		{
 #if !OS(AROS)
 			/* This code overrides internal data structures and causes a crash on AROS */
diff --git Source/WebKit/mui/Api/MorphOS/cookiemanagergroupclass.cpp Source/WebKit/mui/Api/MorphOS/cookiemanagergroupclass.cpp
index f5a8c30..47fc5d2 100644
--- Source/WebKit/mui/Api/MorphOS/cookiemanagergroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/cookiemanagergroupclass.cpp
@@ -141,7 +141,7 @@ DEFNEW
 		//DoMethod(obj, MM_CookieManagerGroup_Load);
 	}
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
diff --git Source/WebKit/mui/Api/MorphOS/cookiemanagerlistclass.cpp Source/WebKit/mui/Api/MorphOS/cookiemanagerlistclass.cpp
index 8b711c7..772cc71 100644
--- Source/WebKit/mui/Api/MorphOS/cookiemanagerlistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/cookiemanagerlistclass.cpp
@@ -83,7 +83,7 @@ MUI_HOOK(cookiemanagerlisttree_constructfunc, APTR pool, APTR t)
 		entry->session = tempentry->session;
 	}
 
-	return (ULONG) (entry);
+	return (IPTR) (entry);
 }
 
 MUI_HOOK(cookiemanagerlisttree_destructfunc, APTR pool, APTR t)
@@ -192,7 +192,7 @@ DEFNEW
 		TAG_MORE, INITTAGS
 	);
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -263,7 +263,7 @@ DEFMMETHOD(ContextMenuBuild)
 		if (item) DoMethod(data->cMenu, MUIM_Family_AddTail, item);
 
 	}
-	return (ULONG)data->cMenu;
+	return (IPTR)data->cMenu;
 }
 
 /***********************************************************************/
@@ -271,7 +271,7 @@ DEFMMETHOD(ContextMenuBuild)
 DEFMMETHOD(ContextMenuChoice)
 {
 	GETDATA;
-	ULONG udata = muiUserData(msg->item);
+	IPTR udata = muiUserData(msg->item);
 	//struct cookie_entry *entry;
 
 	switch(udata)
@@ -317,7 +317,7 @@ DEFMMETHOD(ContextMenuChoice)
  * from nofe different than root. sucky? oh well:)
  */
 
-static APTR tree_iteratefind(Object *lt, struct MUIS_Listtree_TreeNode *list, STRPTR pattern, APTR startnode, ULONG *dosearch)
+static APTR tree_iteratefind(Object *lt, struct MUIS_Listtree_TreeNode *list, STRPTR pattern, APTR startnode, IPTR *dosearch)
 {
 	struct MUIS_Listtree_TreeNode *tn;
 	UWORD pos=0;
@@ -367,7 +367,7 @@ static APTR tree_iteratefind(Object *lt, struct MUIS_Listtree_TreeNode *list, ST
 
 static APTR tree_find(Object *lt, STRPTR pattern, APTR startnode)
 {
-	ULONG dofind = startnode != NULL ? FALSE : TRUE;
+	IPTR dofind = startnode != NULL ? FALSE : TRUE;
 	return tree_iteratefind(lt, MUIV_Listtree_GetEntry_ListNode_Root, pattern, startnode, &dofind);
 }
 
diff --git Source/WebKit/mui/Api/MorphOS/cookiemanagerwindowclass.cpp Source/WebKit/mui/Api/MorphOS/cookiemanagerwindowclass.cpp
index 0c78651..5fc51f3 100644
--- Source/WebKit/mui/Api/MorphOS/cookiemanagerwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/cookiemanagerwindowclass.cpp
@@ -77,7 +77,7 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_CookieManager;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_CookieManager;
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/datetimechooserpopupclass.cpp Source/WebKit/mui/Api/MorphOS/datetimechooserpopupclass.cpp
index 7a29013..9e79047 100755
--- Source/WebKit/mui/Api/MorphOS/datetimechooserpopupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/datetimechooserpopupclass.cpp
@@ -57,8 +57,8 @@ struct Data
 
 DEFNEW
 {
-	Object *source                        = (Object *) GetTagData(MA_DateTimeChooserPopup_Source, NULL, msg->ops_AttrList);
-	DateTimeChooserController *controller = (DateTimeChooserController *) GetTagData(MA_DateTimeChooserPopup_Controller, NULL, msg->ops_AttrList);
+	Object *source                        = (Object *) GetTagData(MA_DateTimeChooserPopup_Source, (IPTR)NULL, msg->ops_AttrList);
+	DateTimeChooserController *controller = (DateTimeChooserController *) GetTagData(MA_DateTimeChooserPopup_Controller, (IPTR)NULL, msg->ops_AttrList);
 
 	if(controller)
 	{
@@ -90,7 +90,7 @@ DEFNEW
 		}
 	}
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
diff --git Source/WebKit/mui/Api/MorphOS/downloadgroupclass.cpp Source/WebKit/mui/Api/MorphOS/downloadgroupclass.cpp
index 70374d9..b75ccc3 100755
--- Source/WebKit/mui/Api/MorphOS/downloadgroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/downloadgroupclass.cpp
@@ -87,7 +87,7 @@ static void cycles_init(void)
 		STRPTR *current = (STRPTR *)*ptr;
 		while(*current)
 		{
-			*current = (STRPTR)GSI((ULONG)*current);
+			*current = (STRPTR)GSI((IPTR)*current);
 			current++;
 		}
 		ptr++;
@@ -507,7 +507,7 @@ DEFMMETHOD(List_Redraw)
 
 		if(dl->gaugeobj)
 		{
-			nnset(dl->gaugeobj, MUIA_Gauge_Current, (ULONG)((float)dl->done / (float)dl->size * 100.f));
+			nnset(dl->gaugeobj, MUIA_Gauge_Current, (IPTR)((float)dl->done / (float)dl->size * 100.f));
 			if(!dl->gaugeimg)
 				dl->gaugeimg = (Object *) DoMethod(data->lv_downloads, MUIM_List_CreateImage, (Object *) dl->gaugeobj, 0);
 		}
diff --git Source/WebKit/mui/Api/MorphOS/downloadlistclass.cpp Source/WebKit/mui/Api/MorphOS/downloadlistclass.cpp
index daf1314..5091d2d 100755
--- Source/WebKit/mui/Api/MorphOS/downloadlistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/downloadlistclass.cpp
@@ -179,7 +179,7 @@ DEFNEW
 		data->cmenu=NULL;
 		doset(obj, data, msg->ops_AttrList);
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -262,7 +262,7 @@ DEFSET
 
 DEFMMETHOD(List_Construct)
 {
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
@@ -279,7 +279,7 @@ DEFMMETHOD(List_Display)
 	{
 		STATIC char buf0[512];
 
-		if( (ULONG)msg->array[-1] % 2 )
+		if( (IPTR)msg->array[-1] % 2 )
 		{
 #if !OS(AROS)
 			/* This code overrides internal data structures and causes a crash on AROS */
@@ -454,7 +454,7 @@ DEFMMETHOD(ContextMenuBuild)
 
 	if (DoMethod(obj, MUIM_List_TestPos, msg->mx, msg->my, &res) && (res.entry != -1))
 	{
-		DoMethod(obj, MUIM_List_GetEntry, res.entry, (ULONG *)&dl);
+		DoMethod(obj, MUIM_List_GetEntry, res.entry, (IPTR *)&dl);
 
 		if(dl)
 		{
@@ -476,18 +476,18 @@ DEFMMETHOD(ContextMenuBuild)
 	            End;
 		}
 	}
-	return (ULONG)data->cmenu;
+	return (IPTR)data->cmenu;
 }
 
 DEFMMETHOD(ContextMenuChoice)
 {
 	struct downloadnode *dl;
 
-	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (ULONG *)&dl);
+	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (IPTR *)&dl);
 
 	if(dl)
 	{
-		ULONG udata = muiUserData(msg->item);
+		IPTR udata = muiUserData(msg->item);
 
 		switch(udata)
 		{
diff --git Source/WebKit/mui/Api/MorphOS/downloadwindowclass.cpp Source/WebKit/mui/Api/MorphOS/downloadwindowclass.cpp
index a1da4bb..b7d3cb8 100755
--- Source/WebKit/mui/Api/MorphOS/downloadwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/downloadwindowclass.cpp
@@ -79,7 +79,7 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_Downloads;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_Downloads;
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/faviconclass.cpp Source/WebKit/mui/Api/MorphOS/faviconclass.cpp
index 7326b2c..1a57a2a 100755
--- Source/WebKit/mui/Api/MorphOS/faviconclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/faviconclass.cpp
@@ -78,7 +78,7 @@ STATIC VOID doset(struct Data *data, APTR obj, struct TagItem *taglist)
 
 	while ((tag = NextTagItem(&tstate)) != NULL)
 	{
-		ULONG tag_data = tag->ti_Data;
+		IPTR tag_data = tag->ti_Data;
 
 		switch (tag->ti_Tag)
 		{
diff --git Source/WebKit/mui/Api/MorphOS/findtextclass.cpp Source/WebKit/mui/Api/MorphOS/findtextclass.cpp
index 2acc663..e5fed28 100755
--- Source/WebKit/mui/Api/MorphOS/findtextclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/findtextclass.cpp
@@ -152,7 +152,7 @@ DEFNEW
 		data->ch_showallmatches = ch_showallmatches;
 		data->txt_notfound      = txt_notfound;
 
-		data->obj_target = (Object *)GetTagData(MA_FindText_Target, NULL, INITTAGS);
+		data->obj_target = (Object *)GetTagData(MA_FindText_Target, (IPTR)NULL, INITTAGS);
 
 		if(bt_prev) set(bt_prev, MUIA_Weight, 0);
 		if(bt_next)	set(bt_next, MUIA_Weight, 0);
@@ -167,7 +167,7 @@ DEFNEW
 		if(bt_close) DoMethod(bt_close, MUIM_Notify, MUIA_Pressed, FALSE, obj, 3, MUIM_Set, MUIA_ShowMe, FALSE);
 	}
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 DEFSET
@@ -184,7 +184,7 @@ DEFGET
 	switch (msg->opg_AttrID)
 	{
 		case MUIA_String_Contents:
-			return GetAttr(MUIA_String_Contents, data->pop_search, (ULONGPTR)msg->opg_Storage);
+			return GetAttr(MUIA_String_Contents, data->pop_search, (IPTR *)msg->opg_Storage);
 	}
 
 	return DOSUPER;
diff --git Source/WebKit/mui/Api/MorphOS/historybuttonclass.cpp Source/WebKit/mui/Api/MorphOS/historybuttonclass.cpp
index 06aa193..3c15038 100755
--- Source/WebKit/mui/Api/MorphOS/historybuttonclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/historybuttonclass.cpp
@@ -110,7 +110,7 @@ DEFNEW
 
 		doset(obj, data, INITTAGS);
 
-		return (ULONG)obj;
+		return (IPTR)obj;
 	}
 
 	return(0);
@@ -145,7 +145,7 @@ DEFGET
 	{
 		case MA_HistoryButton_List:
 		{
-			*msg->opg_Storage = (ULONG) data->backforwardlist;
+			*msg->opg_Storage = (IPTR) data->backforwardlist;
 		}
 		return TRUE;
 	}
@@ -199,7 +199,7 @@ DEFMMETHOD(ContextMenuBuild)
 		}
 		else
 		{
-			return (ULONG) data->contextmenu;
+			return (IPTR) data->contextmenu;
 		}
 
 		for (int i = firstItemIndex ; (data->type == MV_HistoryButton_Type_Backward) ? i >= lastItemIndex : i <= lastItemIndex ; i+=di)
@@ -217,8 +217,8 @@ DEFMMETHOD(ContextMenuBuild)
 					sprintf(label, "%s%s", prefix, tmp);
 
 					Object *item = (Object *) NewObject(getmenuitemclass(), NULL,
-													    MUIA_Menuitem_Title, (ULONG) label,
-											            MUIA_UserData, (ULONG) data->backforwardlist->itemAtIndex(i),
+													    MUIA_Menuitem_Title, (IPTR) label,
+											            MUIA_UserData, (IPTR) data->backforwardlist->itemAtIndex(i),
 														MA_MenuItem_FreeUserData, FALSE, /* Don't free it, thx */
 														TAG_DONE);
 					if(item)
@@ -233,7 +233,7 @@ DEFMMETHOD(ContextMenuBuild)
 	    }
 	}
 
-	return (ULONG) data->contextmenu;
+	return (IPTR) data->contextmenu;
 }
 
 DEFMMETHOD(ContextMenuChoice)
diff --git Source/WebKit/mui/Api/MorphOS/historylistclass.cpp Source/WebKit/mui/Api/MorphOS/historylistclass.cpp
index 8e2ccf6..f9d2e42 100755
--- Source/WebKit/mui/Api/MorphOS/historylistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/historylistclass.cpp
@@ -84,7 +84,7 @@ DEFNEW
 	obj = (Object *) DoSuperNew(cl, obj,
 		InputListFrame,
 		MUIA_List_MinLineHeight, 36,
-		MUIA_List_Format, (getv(app, MA_OWBApp_ShowFavIcons) & MV_OWBApp_ShowFavIcons_History) ? (ULONG) "," : (ULONG) "",
+		MUIA_List_Format, (getv(app, MA_OWBApp_ShowFavIcons) & MV_OWBApp_ShowFavIcons_History) ? (IPTR) "," : (IPTR) "",
 		MUIA_List_Title, FALSE,
 		MUIA_ContextMenu, TRUE,
 		TAG_MORE, INITTAGS
@@ -105,7 +105,7 @@ DEFNEW
 
 		doset(obj, data, msg->ops_AttrList);
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -125,10 +125,10 @@ DEFGET
 	switch (msg->opg_AttrID)
 	{
 		case MA_HistoryList_Opened:
-			*msg->opg_Storage = (ULONG) data->opened;
+			*msg->opg_Storage = (IPTR) data->opened;
             return TRUE;
 		case MA_HistoryList_Complete:
-			*msg->opg_Storage = (ULONG) data->complete;
+			*msg->opg_Storage = (IPTR) data->complete;
             return TRUE;
 	}
 
@@ -237,7 +237,7 @@ DEFMMETHOD(HandleEvent)
 
 						if (_isinobject(obj, imsg->MouseX, imsg->MouseY) && DoMethod(obj, MUIM_List_TestPos, imsg->MouseX, imsg->MouseY, &res) && (res.entry != -1))
 						{
-							DoMethod(obj, MUIM_List_GetEntry, res.entry, (ULONG *)&item);
+							DoMethod(obj, MUIM_List_GetEntry, res.entry, (IPTR *)&item);
 
 							if(item)
 							{
@@ -273,7 +273,7 @@ DEFMMETHOD(List_Construct)
 		hitem->faviconobj = NULL;
 		hitem->faviconimg = NULL;
 	}
-	return (ULONG)hitem;
+	return (IPTR)hitem;
 }
 
 DEFMMETHOD(List_Destruct)
@@ -387,7 +387,7 @@ DEFMMETHOD(List_Display)
 			msg->array[0] = (char *) slabel;
 		}
 
-		if( (ULONG)msg->array[-1] % 2 )
+		if( (IPTR)msg->array[-1] % 2 )
 		{
 #if !OS(AROS)
 			/* This code overrides internal data structures and causes a crash on AROS */
@@ -451,7 +451,7 @@ DEFMMETHOD(ContextMenuBuild)
 
 	if (DoMethod(obj, MUIM_List_TestPos, msg->mx, msg->my, &res) && (res.entry != -1))
 	{
-		DoMethod(obj, MUIM_List_GetEntry, res.entry, (ULONG *)&item);
+		DoMethod(obj, MUIM_List_GetEntry, res.entry, (IPTR *)&item);
 
 		if(item)
 		{
@@ -473,7 +473,7 @@ DEFMMETHOD(ContextMenuBuild)
 	            End;
 		}
 	}
-	return (ULONG)data->cmenu;
+	return (IPTR)data->cmenu;
 }
 
 DEFMMETHOD(ContextMenuChoice)
@@ -481,12 +481,12 @@ DEFMMETHOD(ContextMenuChoice)
 	GETDATA;
 	struct history_entry *item = NULL;
 
-	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (ULONG *)&item);
+	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (IPTR *)&item);
 
 	if(item)
 	{
 		WebHistoryItem *witem = (WebHistoryItem *) item->webhistoryitem;
-		ULONG udata = muiUserData(msg->item);
+		IPTR udata = muiUserData(msg->item);
 
 		switch(udata)
 		{
diff --git Source/WebKit/mui/Api/MorphOS/historylisttreeclass.cpp Source/WebKit/mui/Api/MorphOS/historylisttreeclass.cpp
index 6560cfd..26f43a8 100755
--- Source/WebKit/mui/Api/MorphOS/historylisttreeclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/historylisttreeclass.cpp
@@ -109,7 +109,7 @@ DEFNEW
 		//DoMethod(app, MUIM_Notify, MA_OWBApp_HistoryChanged, MUIV_EveryTime, obj, 1, MM_History_Update);
 		//DoMethod(app, MUIM_Notify, MA_OWBApp_DidReceiveFavIcon, MUIV_EveryTime, obj, 1, MM_History_Update);
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -171,7 +171,7 @@ DEFMMETHOD(List_Construct)
 		entry->faviconimg = (APTR) DoMethod(obj, MUIM_List_CreateImage, entry->faviconobj, 0);
 	}
 
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
@@ -266,7 +266,7 @@ DEFMMETHOD(List_Display)
 		msg->array[0] = (char *) stitle;
 		msg->array[1] = (char *) surl;
 
-		if( (ULONG)msg->array[-1] % 2 )
+		if( (IPTR)msg->array[-1] % 2 )
 		{
 #if !OS(AROS)
 			/* This code overrides internal data structures and causes a crash on AROS */
@@ -305,7 +305,7 @@ DEFMMETHOD(HandleEvent)
 
 						if (_isinobject(obj, imsg->MouseX, imsg->MouseY) && DoMethod(obj, MUIM_List_TestPos, imsg->MouseX, imsg->MouseY, &res) && (res.entry != -1))
 						{
-							DoMethod(obj, MUIM_List_GetEntry, res.entry, (ULONG *)&item);
+							DoMethod(obj, MUIM_List_GetEntry, res.entry, (IPTR *)&item);
 
 							if(item)
 							{
@@ -344,7 +344,7 @@ DEFMMETHOD(ContextMenuBuild)
 
 	if (DoMethod(obj, MUIM_List_TestPos, msg->mx, msg->my, &res) && (res.entry != -1))
 	{
-		DoMethod(obj, MUIM_List_GetEntry, res.entry, (ULONG *)&item);
+		DoMethod(obj, MUIM_List_GetEntry, res.entry, (IPTR *)&item);
 
 		if(item)
 		{
@@ -366,19 +366,19 @@ DEFMMETHOD(ContextMenuBuild)
 	            End;
 		}
 	}
-	return (ULONG)data->cmenu;
+	return (IPTR)data->cmenu;
 }
 
 DEFMMETHOD(ContextMenuChoice)
 {
 	struct history_entry *item;
 
-	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (ULONG *)&item);
+	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (IPTR *)&item);
 
 	if(item)
 	{
 		WebHistoryItem *witem = (WebHistoryItem *) item->webhistoryitem;
-		ULONG udata = muiUserData(msg->item);
+		IPTR udata = muiUserData(msg->item);
 
 		switch(udata)
 		{
diff --git Source/WebKit/mui/Api/MorphOS/historypanelgroupclass.cpp Source/WebKit/mui/Api/MorphOS/historypanelgroupclass.cpp
index eb1f169..02e4004 100755
--- Source/WebKit/mui/Api/MorphOS/historypanelgroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/historypanelgroupclass.cpp
@@ -90,7 +90,7 @@ DEFNEW
 		DoMethod(closebutton, MUIM_Notify, MUIA_Pressed, FALSE, MUIV_Notify_Window, 1, MM_OWBWindow_RemoveHistoryPanel);
 	}
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
diff --git Source/WebKit/mui/Api/MorphOS/historypopstringclass.cpp Source/WebKit/mui/Api/MorphOS/historypopstringclass.cpp
index 0df741f..cd1972c 100755
--- Source/WebKit/mui/Api/MorphOS/historypopstringclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/historypopstringclass.cpp
@@ -162,16 +162,16 @@ DEFGET
 			return TRUE;
 
 		case MUIA_Popobject_Object:
-            *msg->opg_Storage = (ULONG) data->lv_entries;
+            *msg->opg_Storage = (IPTR) data->lv_entries;
             return TRUE;
 
 		case MUIA_Popstring_String:
-			*msg->opg_Storage = (ULONG) data->str;
+			*msg->opg_Storage = (IPTR) data->str;
 			return TRUE;
 
 		case MA_OWB_URL:
 		case MUIA_String_Contents:
-			return GetAttr(MUIA_String_Contents, data->str, (ULONGPTR)msg->opg_Storage);
+			return GetAttr(MUIA_String_Contents, data->str, (IPTR *)msg->opg_Storage);
 	}
 
 	return DOSUPER;
diff --git Source/WebKit/mui/Api/MorphOS/iconclass.cpp Source/WebKit/mui/Api/MorphOS/iconclass.cpp
index ea75078..bc6b194 100755
--- Source/WebKit/mui/Api/MorphOS/iconclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/iconclass.cpp
@@ -71,7 +71,7 @@ STATIC VOID doset(struct Data *data, APTR obj, struct TagItem *taglist)
 
 	while ((tag = NextTagItem(&tstate)) != NULL)
 	{
-		ULONG tag_data = tag->ti_Data;
+		IPTR tag_data = tag->ti_Data;
 
 		switch (tag->ti_Tag)
 		{
diff --git Source/WebKit/mui/Api/MorphOS/include/macros/vapor.h Source/WebKit/mui/Api/MorphOS/include/macros/vapor.h
index 41157e3..5e251a7 100755
--- Source/WebKit/mui/Api/MorphOS/include/macros/vapor.h
+++ Source/WebKit/mui/Api/MorphOS/include/macros/vapor.h
@@ -114,53 +114,53 @@
 /*
  * MUI method (ie. MUIM_List_InsertSingle)
  */
-#define DEFMMETHOD(methodid) METHOD_INLINE static ULONG __attribute__ ((noinline)) handleMUIM_##methodid(struct IClass *cl,Object*obj,struct MUIP_##methodid *msg)
+#define DEFMMETHOD(methodid) METHOD_INLINE static IPTR __attribute__ ((noinline)) handleMUIM_##methodid(struct IClass *cl,Object*obj,struct MUIP_##methodid *msg)
 
 /*
  * Custom method with ONE argument only (no msg[n] please)
  */
-#define DEFMETHOD(methodid,type) METHOD_INLINE static ULONG __attribute__ ((noinline)) handleMM_##methodid(struct IClass *cl, Object *obj, type *msg)
+#define DEFMETHOD(methodid,type) METHOD_INLINE static IPTR __attribute__ ((noinline)) handleMM_##methodid(struct IClass *cl, Object *obj, type *msg)
 
 /*
  * Custom method with NO real arguments (Msg still passed for DSM etc.)
  */
-#define DEFTMETHOD(methodid) METHOD_INLINE static ULONG __attribute__ ((noinline)) handleMM_##methodid(struct IClass *cl, Object *obj, Msg msg)
+#define DEFTMETHOD(methodid) METHOD_INLINE static IPTR __attribute__ ((noinline)) handleMM_##methodid(struct IClass *cl, Object *obj, Msg msg)
 
 /*
  * Custom structured method
  */
-#define DEFSMETHOD(name) METHOD_INLINE static ULONG __attribute__ ((noinline)) handleMM_##name(struct IClass *cl,Object*obj,struct MP_##name *msg)
+#define DEFSMETHOD(name) METHOD_INLINE static IPTR __attribute__ ((noinline)) handleMM_##name(struct IClass *cl,Object*obj,struct MP_##name *msg)
 
 /*
  * OM_NEW method (construct)
  */
-#define DEFNEW METHOD_INLINE static ULONG __attribute__ ((noinline)) handleOM_NEW(struct IClass *cl,Object*obj,struct opSet *msg)
+#define DEFNEW METHOD_INLINE static IPTR __attribute__ ((noinline)) handleOM_NEW(struct IClass *cl,Object*obj,struct opSet *msg)
 #define DEFCONST DEFNEW
 
 /*
  * OM_SET method
  */
-#define DEFSET METHOD_INLINE static ULONG __attribute__ ((noinline)) handleOM_SET(struct IClass *cl,Object*obj,struct opSet *msg)
+#define DEFSET METHOD_INLINE static IPTR __attribute__ ((noinline)) handleOM_SET(struct IClass *cl,Object*obj,struct opSet *msg)
 
 /* 
  * OM_GET method
  */
-#define DEFGET METHOD_INLINE static ULONG handleOM_GET(struct IClass *cl,Object*obj,struct opGet *msg)
+#define DEFGET METHOD_INLINE static IPTR handleOM_GET(struct IClass *cl,Object*obj,struct opGet *msg)
 
 /*
  * OM_ADDMEMBER method
  */
-#define DEFADDMEMBER METHOD_INLINE static ULONG __attribute__ ((noinline)) handleOM_ADDMEMBER(struct IClass *cl,Object*obj,struct opMember *msg)
+#define DEFADDMEMBER METHOD_INLINE static IPTR __attribute__ ((noinline)) handleOM_ADDMEMBER(struct IClass *cl,Object*obj,struct opMember *msg)
 
 /*
  * OM_REMMEMBER method
  */
-#define DEFREMMEMBER METHOD_INLINE static ULONG __attribute__ ((noinline)) handleOM_REMMEMBER(struct IClass *cl,Object*obj,struct opMember *msg)
+#define DEFREMMEMBER METHOD_INLINE static IPTR __attribute__ ((noinline)) handleOM_REMMEMBER(struct IClass *cl,Object*obj,struct opMember *msg)
 
 /*
  * OM_DISPOSE method (destruct)
  */
-#define DEFDISPOSE METHOD_INLINE static ULONG __attribute__ ((noinline)) handleOM_DISPOSE( struct IClass *cl,Object*obj,struct opSet *msg)
+#define DEFDISPOSE METHOD_INLINE static IPTR __attribute__ ((noinline)) handleOM_DISPOSE( struct IClass *cl,Object*obj,struct opSet *msg)
 #define DEFDEST DEFDISPOSE
 #define DEFDISP DEFDISPOSE
 
@@ -203,7 +203,7 @@
  * Creates a subclass (no constructor)
  */
 #define DECSUBCLASS_NC(super,name) static struct MUI_CustomClass *mcc##name; \
-	ULONG create_##name(void) \
+	IPTR create_##name(void) \
 	{ \
 		if (!(mcc##name = (struct MUI_CustomClass *)MUI_CreateCustomClass(NULL, super, NULL, sizeof(struct Data), (APTR)DISPATCHERREF))) \
 			return (FALSE); \
@@ -229,7 +229,7 @@
  * Creates a subclass of one of your own subclass (no constructor)
  */
 #define DECSUBCLASSPTR_NC(super,name) static struct MUI_CustomClass *mcc##name; \
-	ULONG create_##name(void) \
+	IPTR create_##name(void) \
 	{ \
 		if (!(mcc##name = (struct MUI_CustomClass *)MUI_CreateCustomClass(NULL, NULL, (struct MUI_CustomClass *) get##super##root(), sizeof(struct Data), (APTR)DISPATCHERREF))) \
 			return (FALSE); \
@@ -259,17 +259,17 @@
 #define ENDASTORE }
 #define ASTORE(t,x) case t: data->x = tag->ti_Data;break;
 #define ASTOREP(t,x) case t: data->x = (APTR)tag->ti_Data;break;
-#define STOREP(x) *msg->opg_Storage=(ULONG)(x)
-#define STOREATTR(i,x) case i:*msg->opg_Storage=(ULONG)(x);return(TRUE);
+#define STOREP(x) *msg->opg_Storage=(IPTR)(x)
+#define STOREATTR(i,x) case i:*msg->opg_Storage=(IPTR)(x);return(TRUE);
 
 /* Hooks */
 
 #ifdef __AROS__
 
 #define MUI_HOOK(n, y, z) \
-    static LONG n##_func(struct Hook * n, y, z); \
+    static IPTR n##_func(struct Hook * n, y, z); \
     static struct Hook n##_hook = {{0, 0}, (APTR)n##_func, NULL, NULL}; \
-    static LONG n##_func(struct Hook * n, y, z)
+    static IPTR n##_func(struct Hook * n, y, z)
 
 #else
 #ifdef __MORPHOS__
diff --git Source/WebKit/mui/Api/MorphOS/linklistclass.cpp Source/WebKit/mui/Api/MorphOS/linklistclass.cpp
index 06eff5c..0e9010e 100755
--- Source/WebKit/mui/Api/MorphOS/linklistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/linklistclass.cpp
@@ -97,9 +97,9 @@ DEFNEW
 	{
 		GETDATA;
 		data->cMenu=NULL;
-		data->Drop=NULL;
+		data->Drop=(IPTR)NULL;
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -121,7 +121,7 @@ DEFSET
 
 DEFMMETHOD(List_Construct)
 {
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
@@ -188,7 +188,7 @@ DEFMMETHOD(List_Display)
 		msg->array[0] = td->buffer2;
 		msg->array[1] = td->address;
 
-		if( (ULONG)msg->array[-1] % 2 )
+		if( (IPTR)msg->array[-1] % 2 )
 		{
 #if !OS(AROS)
 			/* This code overrides internal data structures and causes a crash on AROS */
@@ -212,13 +212,13 @@ DEFMMETHOD(List_Compare)
 	struct treedata *td1=(struct treedata *)msg->entry1;
 	struct treedata *td2=(struct treedata *)msg->entry2;
 
-	if (td2->ql_order==0 && td1->ql_order!=0) return (ULONG)-1;
+	if (td2->ql_order==0 && td1->ql_order!=0) return (IPTR)-1;
 	if (td1->ql_order==0 && td2->ql_order!=0) return 1;
 
 	if (td1->ql_order>td2->ql_order) return 1;
-	if (td1->ql_order<td2->ql_order) return (ULONG)-1;
+	if (td1->ql_order<td2->ql_order) return (IPTR)-1;
 
-	if (!td1->alias) return (ULONG)-1;
+	if (!td1->alias) return (IPTR)-1;
 	if (!td2->alias) return 1;
 
 	return stricmp(td1->alias,td2->alias);
@@ -315,7 +315,7 @@ DEFMMETHOD(CreateShortHelp)
 				if (help)
 				{
 					sprintf(help, "%s\n%s", td->title, td->address);
-					return ((ULONG)help);
+					return ((IPTR)help);
 				}
 			}
 		}
diff --git Source/WebKit/mui/Api/MorphOS/loginwindowclass.cpp Source/WebKit/mui/Api/MorphOS/loginwindowclass.cpp
index cecfc6d..88fb4c0 100755
--- Source/WebKit/mui/Api/MorphOS/loginwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/loginwindowclass.cpp
@@ -59,10 +59,10 @@ DEFNEW
 	STRPTR realm, host, suggested_login, suggested_password;
 	char message[1024];
 
-	host  = (STRPTR) GetTagData(MA_LoginWindow_Host, NULL, msg->ops_AttrList);
-	realm = (STRPTR) GetTagData(MA_LoginWindow_Realm, NULL, msg->ops_AttrList);
-	suggested_login    = (STRPTR) GetTagData(MA_LoginWindow_Username, NULL, msg->ops_AttrList);
-	suggested_password = (STRPTR) GetTagData(MA_LoginWindow_Password, NULL, msg->ops_AttrList);
+	host  = (STRPTR) GetTagData(MA_LoginWindow_Host, (IPTR)NULL, msg->ops_AttrList);
+	realm = (STRPTR) GetTagData(MA_LoginWindow_Realm, (IPTR)NULL, msg->ops_AttrList);
+	suggested_login    = (STRPTR) GetTagData(MA_LoginWindow_Username, (IPTR)NULL, msg->ops_AttrList);
+	suggested_password = (STRPTR) GetTagData(MA_LoginWindow_Password, (IPTR)NULL, msg->ops_AttrList);
 
 	snprintf(message, sizeof(message), GSI(MSG_LOGINWINDOW_MESSAGE), realm, host);
 
@@ -146,25 +146,25 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_Auth;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_Auth;
 		}
 		return TRUE;
 
 		case MA_LoginWindow_Username:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->st_user, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->st_user, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_LoginWindow_Password:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->st_password, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->st_password, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_LoginWindow_SaveAuthentication:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_save, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_save, MUIA_Selected);
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/mediacontrolsgroupclass.cpp Source/WebKit/mui/Api/MorphOS/mediacontrolsgroupclass.cpp
index d0175a0..a6bccf8 100755
--- Source/WebKit/mui/Api/MorphOS/mediacontrolsgroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/mediacontrolsgroupclass.cpp
@@ -71,7 +71,7 @@ static void doset(APTR obj, struct Data *data, struct TagItem *tags)
 
 	while ((tag = NextTagItem(&tstate)) != NULL)
 	{
-		ULONG tdata = tag->ti_Data;
+		IPTR tdata = tag->ti_Data;
 
 		switch (tag->ti_Tag)
 		{
@@ -163,7 +163,7 @@ DEFNEW
 		DoMethod(data->sl_volume, MUIM_Notify, MUIA_Slider_Level, MUIV_EveryTime, obj, 1, MM_MediaControlsGroup_Volume);
 	}
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 DEFSET
diff --git Source/WebKit/mui/Api/MorphOS/menuclass.cpp Source/WebKit/mui/Api/MorphOS/menuclass.cpp
index 6fd74c8..b04e386 100755
--- Source/WebKit/mui/Api/MorphOS/menuclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/menuclass.cpp
@@ -43,7 +43,7 @@ DEFNEW
 		TAG_MORE, INITTAGS
 	);
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 
diff --git Source/WebKit/mui/Api/MorphOS/menuitemclass.cpp Source/WebKit/mui/Api/MorphOS/menuitemclass.cpp
index 3316f26..16c6997 100644
--- Source/WebKit/mui/Api/MorphOS/menuitemclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/menuitemclass.cpp
@@ -50,7 +50,7 @@ DEFNEW
 		data->freeuserdata = GetTagData(MA_MenuItem_FreeUserData, TRUE, msg->ops_AttrList);
 	}
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 
diff --git Source/WebKit/mui/Api/MorphOS/methodstack.c Source/WebKit/mui/Api/MorphOS/methodstack.c
index 91aa683..261aef7 100755
--- Source/WebKit/mui/Api/MorphOS/methodstack.c
+++ Source/WebKit/mui/Api/MorphOS/methodstack.c
@@ -43,8 +43,8 @@ struct pushedmethod
 	ULONG size;
 	APTR obj;
 	ULONG sync;
-	ULONG result;
-	ULONG m[0];
+	IPTR result;
+	IPTR m[0];
 };
 
 struct pushedmessage
@@ -53,8 +53,8 @@ struct pushedmessage
 	ULONG size;
 	APTR obj;
 	ULONG sync;
-	ULONG result;
-	ULONG m[0];
+	IPTR result;
+	IPTR m[0];
 };
 
 void WakeTimer(void)
@@ -180,7 +180,7 @@ void methodstack_push(APTR obj, ULONG cnt, ...)
 	va_list va;
 
 	va_start(va, cnt);
-	size = sizeof(*pm) + cnt * sizeof(ULONG);
+	size = sizeof(*pm) + cnt * sizeof(IPTR);
 
 	if ((pm = AllocMem(size, MEMF_ANY)))
 	{
@@ -191,7 +191,7 @@ void methodstack_push(APTR obj, ULONG cnt, ...)
 
 		while (cnt--)
 		{
-			pm->m[i] = va_arg(va, ULONG);
+			pm->m[i] = va_arg(va, IPTR);
 			i++;
 		}
 
@@ -227,7 +227,7 @@ ULONG methodstack_push_sync(APTR obj, ULONG cnt, ...)
 	va_list va;
 
 	va_start(va, cnt);
-	size = sizeof(*pm) + cnt * sizeof(ULONG);
+	size = sizeof(*pm) + cnt * sizeof(IPTR);
 	res = 0;
 
 	if ((pm = AllocMem(size, MEMF_ANY)))
@@ -238,7 +238,7 @@ ULONG methodstack_push_sync(APTR obj, ULONG cnt, ...)
 
 		while (cnt--)
 		{
-			pm->m[i] = va_arg(va, ULONG);
+			pm->m[i] = va_arg(va, IPTR);
 			i++;
 		}
 
diff --git Source/WebKit/mui/Api/MorphOS/mimetypegroupclass.cpp Source/WebKit/mui/Api/MorphOS/mimetypegroupclass.cpp
index e8cabc4..b3259d4 100755
--- Source/WebKit/mui/Api/MorphOS/mimetypegroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/mimetypegroupclass.cpp
@@ -133,7 +133,7 @@ static void cycles_init(void)
 		STRPTR *current = (STRPTR *)*ptr;
 		while(*current)
 		{
-			*current = (STRPTR)GSI((ULONG)*current);
+			*current = (STRPTR)GSI((IPTR)*current);
 			current++;
 		}
 		ptr++;
diff --git Source/WebKit/mui/Api/MorphOS/mimetypelistclass.cpp Source/WebKit/mui/Api/MorphOS/mimetypelistclass.cpp
index 9335922..82e70fe 100755
--- Source/WebKit/mui/Api/MorphOS/mimetypelistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/mimetypelistclass.cpp
@@ -57,12 +57,12 @@ DEFNEW
 	if (obj)
 	{
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFMMETHOD(List_Construct)
 {
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
@@ -114,7 +114,7 @@ DEFMMETHOD(List_Display)
 		msg->array[2] = action;
 		msg->array[3] = buf;
 
-		if( (ULONG)msg->array[-1] % 2 )
+		if( (IPTR)msg->array[-1] % 2 )
 		{
 #if !OS(AROS)
 			/* This code overrides internal data structures and causes a crash on AROS */
diff --git Source/WebKit/mui/Api/MorphOS/mui.cpp Source/WebKit/mui/Api/MorphOS/mui.cpp
index 4a87a97..5dffb50 100755
--- Source/WebKit/mui/Api/MorphOS/mui.cpp
+++ Source/WebKit/mui/Api/MorphOS/mui.cpp
@@ -123,8 +123,8 @@ APTR MakeDirString(CONST_STRPTR str, CONST_STRPTR def, ULONG id)
 	obj = PopaslObject,
 		ASLFR_DrawersOnly, TRUE,
 		ASLFR_InitialShowVolumes, TRUE,
-		MUIA_Popstring_Button, (ULONG)pop,
-		MUIA_Popstring_String, (ULONG)MakePrefsString(str, def, 1024, id),
+		MUIA_Popstring_Button, (IPTR)pop,
+		MUIA_Popstring_String, (IPTR)MakePrefsString(str, def, 1024, id),
 		MUIA_Popasl_Type, ASL_FileRequest,
 		TAG_DONE);
 
@@ -142,8 +142,8 @@ APTR MakeFileString(CONST_STRPTR str, CONST_STRPTR def, ULONG id)
 
 	obj = PopaslObject,
 		ASLFR_InitialFile, def,
-		MUIA_Popstring_Button, (ULONG)pop,
-		MUIA_Popstring_String, (ULONG)MakePrefsString(str, def, 1024, id),
+		MUIA_Popstring_Button, (IPTR)pop,
+		MUIA_Popstring_String, (IPTR)MakePrefsString(str, def, 1024, id),
 		MUIA_Popasl_Type, ASL_FileRequest,
 		TAG_DONE);
 
@@ -236,7 +236,7 @@ ULONG getv(APTR obj, ULONG attr)
 }
 #endif
 #if OS(AROS)
-IPTR getv(APTR obj, ULONG attr)
+IPTR getv(APTR obj, IPTR attr)
 {
     IPTR val;
     GetAttr(attr, (Object *)obj, &val);
diff --git Source/WebKit/mui/Api/MorphOS/mui.h Source/WebKit/mui/Api/MorphOS/mui.h
index 3c7a1a1..58a654b 100755
--- Source/WebKit/mui/Api/MorphOS/mui.h
+++ Source/WebKit/mui/Api/MorphOS/mui.h
@@ -272,7 +272,7 @@ APTR MakeCycleLocalized(CONST_STRPTR text, APTR cyclelabels, ULONG first, ULONG
 ULONG getv(APTR obj, ULONG attr);
 #endif
 #if defined(__AROS__)
-IPTR getv(APTR obj, ULONG attr);
+IPTR getv(APTR obj, IPTR attr);
 #include <aros-overrides.h>
 #endif
 
diff --git Source/WebKit/mui/Api/MorphOS/navigationgroupclass.cpp Source/WebKit/mui/Api/MorphOS/navigationgroupclass.cpp
index 999b780..6d10f00 100755
--- Source/WebKit/mui/Api/MorphOS/navigationgroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/navigationgroupclass.cpp
@@ -52,7 +52,7 @@ static void doset(APTR obj, struct Data *data, struct TagItem *tags)
 
 	while ((tag = NextTagItem(&tstate)) != NULL)
 	{
-		ULONG tdata = tag->ti_Data;
+		IPTR tdata = tag->ti_Data;
 
 		switch (tag->ti_Tag)
 		{
@@ -157,7 +157,7 @@ DEFNEW
 		set(obj, MA_OWBApp_ToolButtonType, type);
 	}
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 DEFSET
diff --git Source/WebKit/mui/Api/MorphOS/networkledsgroupclass.cpp Source/WebKit/mui/Api/MorphOS/networkledsgroupclass.cpp
index 5528f8a..33aa293 100755
--- Source/WebKit/mui/Api/MorphOS/networkledsgroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/networkledsgroupclass.cpp
@@ -132,7 +132,7 @@ DEFNEW
 
 		DoMethod(obj, MUIM_Notify, MUIA_Pressed, FALSE, MUIV_Notify_Application, 2, MM_OWBApp_OpenWindow, MV_OWB_Window_Network);
 
-		return (ULONG)obj;
+		return (IPTR)obj;
 	}
 
 	return(0);
diff --git Source/WebKit/mui/Api/MorphOS/networklistclass.cpp Source/WebKit/mui/Api/MorphOS/networklistclass.cpp
index 14f922c..b85c7f6 100644
--- Source/WebKit/mui/Api/MorphOS/networklistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/networklistclass.cpp
@@ -70,7 +70,7 @@ DEFNEW
 		GETDATA;
 		data->cmenu=NULL;
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -85,7 +85,7 @@ DEFDISP
 
 DEFMMETHOD(List_Construct)
 {
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
@@ -165,7 +165,7 @@ DEFMMETHOD(ContextMenuBuild)
 
 	if (DoMethod(obj, MUIM_List_TestPos, msg->mx, msg->my, &res) && (res.entry != -1))
 	{
-		DoMethod(obj, MUIM_List_GetEntry, res.entry, (ULONG *)&e);
+		DoMethod(obj, MUIM_List_GetEntry, res.entry, (IPTR *)&e);
 
 		if(e)
 		{
@@ -179,18 +179,18 @@ DEFMMETHOD(ContextMenuBuild)
 	            End;
 		}
 	}
-	return (ULONG)data->cmenu;
+	return (IPTR)data->cmenu;
 }
 
 DEFMMETHOD(ContextMenuChoice)
 {
 	ResourceHandle *e;
 
-	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (ULONG *)&e);
+	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (IPTR *)&e);
 
 	if(e)
 	{
-		ULONG udata = muiUserData(msg->item);
+		IPTR udata = muiUserData(msg->item);
 
 		switch(udata)
 		{
diff --git Source/WebKit/mui/Api/MorphOS/networkwindowclass.cpp Source/WebKit/mui/Api/MorphOS/networkwindowclass.cpp
index ab42c81..9efbebf 100755
--- Source/WebKit/mui/Api/MorphOS/networkwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/networkwindowclass.cpp
@@ -89,7 +89,7 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_Network;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_Network;
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/owbbrowserclass.cpp Source/WebKit/mui/Api/MorphOS/owbbrowserclass.cpp
index a89906c..df94be2 100755
--- Source/WebKit/mui/Api/MorphOS/owbbrowserclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/owbbrowserclass.cpp
@@ -194,12 +194,12 @@ static __inline IPTR _CALLFUNC2(void (*func)(void), IPTR arg1, IPTR arg2)
 Object *create_browser(char * url, ULONG is_frame, Object *title, APTR sourceview, Object *window, ULONG privatebrowsing)
 {
 	return (Object *) NewObject(getowbbrowserclass(), NULL,
-						MA_OWBBrowser_URL, (ULONG) url,
-						MA_OWBBrowser_IsFrame, (ULONG) is_frame,
-						MA_OWBBrowser_TitleObj, (ULONG) title,
-						MA_OWBBrowser_SourceView, (ULONG) sourceview,
-						MA_OWBBrowser_Window, (ULONG) window,
-						MA_OWBBrowser_PrivateBrowsing, (ULONG) privatebrowsing,
+						MA_OWBBrowser_URL, (IPTR) url,
+						MA_OWBBrowser_IsFrame, (IPTR) is_frame,
+						MA_OWBBrowser_TitleObj, (IPTR) title,
+						MA_OWBBrowser_SourceView, (IPTR) sourceview,
+						MA_OWBBrowser_Window, (IPTR) window,
+						MA_OWBBrowser_PrivateBrowsing, (IPTR) privatebrowsing,
 						TAG_DONE);
 }
 
@@ -396,7 +396,7 @@ DEFNEW
 
 	if(obj)
 	{
-		char *url = (char *) GetTagData(MA_OWBBrowser_URL, NULL, msg->ops_AttrList);
+		char *url = (char *) GetTagData(MA_OWBBrowser_URL, (IPTR)NULL, msg->ops_AttrList);
 		GETDATA;
 
 		data->added = FALSE;
@@ -411,9 +411,9 @@ DEFNEW
 		data->reload_available  = TRUE;
 		data->stop_available    = FALSE;
 
-		data->source_view = (APTR)     GetTagData(MA_OWBBrowser_SourceView, NULL, msg->ops_AttrList);
-		data->is_frame    = (ULONG)    GetTagData(MA_OWBBrowser_IsFrame,    NULL, msg->ops_AttrList);
-		data->titleobj   = (Object *) GetTagData(MA_OWBBrowser_TitleObj,   NULL, msg->ops_AttrList);
+		data->source_view = (APTR)     GetTagData(MA_OWBBrowser_SourceView, (IPTR)NULL, msg->ops_AttrList);
+		data->is_frame    = (ULONG)    GetTagData(MA_OWBBrowser_IsFrame,    (IPTR)NULL, msg->ops_AttrList);
+		data->titleobj   = (Object *) GetTagData(MA_OWBBrowser_TitleObj,   (IPTR)NULL, msg->ops_AttrList);
 		set(data->titleobj, MUIA_UserData, obj);
 		DoMethod(obj, MUIM_Notify, MA_OWBBrowser_Title, MUIV_EveryTime, data->titleobj, 3, MUIM_Set, MUIA_Text_Contents, MUIV_TriggerValue);
 
@@ -425,7 +425,7 @@ DEFNEW
 		data->view->app     = _app(obj);
 #endif
 
-		data->view->window  = (Object *) GetTagData(MA_OWBBrowser_Window, NULL, msg->ops_AttrList);
+		data->view->window  = (Object *) GetTagData(MA_OWBBrowser_Window, (IPTR)NULL, msg->ops_AttrList);
 
 		/* Browser default settings (could be set at init from opener) */
 		data->settings.javascript      = JAVASCRIPT_DEFAULT;
@@ -485,7 +485,7 @@ DEFNEW
 		data->view->webView->onResize(re);
 
 		/* Passed attributes */
-		set(obj, MA_OWBBrowser_PrivateBrowsing, (ULONG) GetTagData(MA_OWBBrowser_PrivateBrowsing, FALSE, msg->ops_AttrList));
+		set(obj, MA_OWBBrowser_PrivateBrowsing, (IPTR) GetTagData(MA_OWBBrowser_PrivateBrowsing, FALSE, msg->ops_AttrList));
 
 		//kprintf("OWBBrowser: loading url <%s> is_frame: %d sourceview %p\n", data->url, data->is_frame, data->source_view);
 
@@ -587,7 +587,7 @@ DEFNEW
 		if(view) free(view);
 	}
 
-	return (ULONG) obj;
+	return (IPTR) obj;
 }
 
 DEFDISPOSE
@@ -960,7 +960,7 @@ static void doset(APTR obj, struct Data *data, struct TagItem *tags)
 
 		case MA_OWBBrowser_UserAgent:
 		{
-			data->settings.useragent = (ULONG) tag->ti_Data;
+			data->settings.useragent = (IPTR) tag->ti_Data;
 			char *useragent = (char *) (data->settings.useragent != USERAGENT_DEFAULT ? get_user_agent_strings()[data->settings.useragent] : "");
 			data->view->webView->setCustomUserAgent(useragent);
 		}
@@ -1099,178 +1099,178 @@ DEFGET
 
 		case MA_OWBBrowser_BackAvailable:
 		{
-			*msg->opg_Storage = (ULONG) data->back_available;
+			*msg->opg_Storage = (IPTR) data->back_available;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_ForwardAvailable:
 		{
-			*msg->opg_Storage = (ULONG) data->forward_available;
+			*msg->opg_Storage = (IPTR) data->forward_available;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_ReloadAvailable:
 		{
-			*msg->opg_Storage = (ULONG) data->reload_available;
+			*msg->opg_Storage = (IPTR) data->reload_available;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_StopAvailable:
 		{
-			*msg->opg_Storage = (ULONG) data->stop_available;
+			*msg->opg_Storage = (IPTR) data->stop_available;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_Widget:
 		{
-			*msg->opg_Storage = (ULONG) data->view;
+			*msg->opg_Storage = (IPTR) data->view;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_URL:
 		{
-			*msg->opg_Storage = (ULONG) data->url;
+			*msg->opg_Storage = (IPTR) data->url;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_EditedURL:
 		{
-			*msg->opg_Storage = (ULONG) data->editedurl;
+			*msg->opg_Storage = (IPTR) data->editedurl;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_IsFrame:
 		{
-			*msg->opg_Storage = (ULONG) data->is_frame;
+			*msg->opg_Storage = (IPTR) data->is_frame;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_SourceView:
 		{
-			*msg->opg_Storage = (ULONG) data->source_view;
+			*msg->opg_Storage = (IPTR) data->source_view;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_Title:
 		{
-			*msg->opg_Storage = (ULONG) data->title;
+			*msg->opg_Storage = (IPTR) data->title;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_Loading:
 		{
-			*msg->opg_Storage = (ULONG) data->loading;
+			*msg->opg_Storage = (IPTR) data->loading;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_State:
 		{
-			*msg->opg_Storage = (ULONG) data->state;
+			*msg->opg_Storage = (IPTR) data->state;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_Zone:
 		{
-			*msg->opg_Storage = (ULONG) data->zone;
+			*msg->opg_Storage = (IPTR) data->zone;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_Security:
 		{
-			*msg->opg_Storage = (ULONG) data->security;
+			*msg->opg_Storage = (IPTR) data->security;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_LoadingProgress:
 		{
-			*msg->opg_Storage = (ULONG) data->loadprogress;
+			*msg->opg_Storage = (IPTR) data->loadprogress;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_StatusText:
 		{
-			*msg->opg_Storage = (ULONG) data->status;
+			*msg->opg_Storage = (IPTR) data->status;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_ToolTipText:
 		{
-			*msg->opg_Storage = (ULONG) data->tooltip;
+			*msg->opg_Storage = (IPTR) data->tooltip;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_TitleObj:
 		{
-			*msg->opg_Storage = (ULONG) data->titleobj;
+			*msg->opg_Storage = (IPTR) data->titleobj;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_Active:
 		{
-			*msg->opg_Storage = (ULONG) data->is_active;
+			*msg->opg_Storage = (IPTR) data->is_active;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_ForbidEvents:
 		{
-			*msg->opg_Storage = (ULONG) data->forbid_events;
+			*msg->opg_Storage = (IPTR) data->forbid_events;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_ParentBrowser:
 		{
-			*msg->opg_Storage = (ULONG) data->parent_browser;
+			*msg->opg_Storage = (IPTR) data->parent_browser;
 		}
 		break;
 
 		case MA_OWBBrowser_PluginsEnabled:
 		{
-			*msg->opg_Storage = (ULONG) data->settings.plugins;
+			*msg->opg_Storage = (IPTR) data->settings.plugins;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_PrivateBrowsing:
 		{
-			*msg->opg_Storage = (ULONG) data->settings.privatebrowsing;
+			*msg->opg_Storage = (IPTR) data->settings.privatebrowsing;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_ContentBlocking:
 		{
-			*msg->opg_Storage = (ULONG) data->settings.blocking;
+			*msg->opg_Storage = (IPTR) data->settings.blocking;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_LoadImagesAutomatically:
 		{
-			*msg->opg_Storage = (ULONG) data->settings.images;
+			*msg->opg_Storage = (IPTR) data->settings.images;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_PlayAnimations:
 		{
-			*msg->opg_Storage = (ULONG) data->settings.animations;
+			*msg->opg_Storage = (IPTR) data->settings.animations;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_JavaScriptEnabled:
 		{
-			*msg->opg_Storage = (ULONG) data->settings.javascript;
+			*msg->opg_Storage = (IPTR) data->settings.javascript;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_UserAgent:
 		{
-			*msg->opg_Storage = (ULONG) data->settings.useragent;
+			*msg->opg_Storage = (IPTR) data->settings.useragent;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_VideoElement:
 		{
 #if ENABLE(VIDEO)
-			*msg->opg_Storage = (ULONG) data->video_element;
+			*msg->opg_Storage = (IPTR) data->video_element;
 #else
-            *msg->opg_Storage = (ULONG) 0;
+            *msg->opg_Storage = (IPTR) 0;
 #endif
 		}
 		return TRUE;
@@ -1279,86 +1279,86 @@ DEFGET
 		case MA_OWBBrowser_DragURL:
 		case MA_OWB_URL:
 		{
-			*msg->opg_Storage = (ULONG) data->dragurl;
+			*msg->opg_Storage = (IPTR) data->dragurl;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_DragData:
 		{
-			*msg->opg_Storage = (ULONG) dataObject;
+			*msg->opg_Storage = (IPTR) dataObject;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_DragOperation:
 		{
-			*msg->opg_Storage = (ULONG) data->dragoperation;
+			*msg->opg_Storage = (IPTR) data->dragoperation;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_DragImage:
 		{
-			*msg->opg_Storage = (ULONG) data->dragimage;
+			*msg->opg_Storage = (IPTR) data->dragimage;
 		}
 		return TRUE;
 
 		/* Scrollers */
 		case MA_OWBBrowser_VBar:
 		{
-			*msg->opg_Storage = (ULONG) data->vbar;
+			*msg->opg_Storage = (IPTR) data->vbar;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_VBarGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->vbargroup;
+			*msg->opg_Storage = (IPTR) data->vbargroup;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_HBar:
 		{
-			*msg->opg_Storage = (ULONG) data->hbar;
+			*msg->opg_Storage = (IPTR) data->hbar;
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_HBarGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->hbargroup;
+			*msg->opg_Storage = (IPTR) data->hbargroup;
 		}
 		return TRUE;
 		
 		case MA_OWBBrowser_VTopPixel:
 		{
-			*msg->opg_Storage = (ULONG) core(data->view->webView->mainFrame())->view()->visibleContentRect().y();
+			*msg->opg_Storage = (IPTR) core(data->view->webView->mainFrame())->view()->visibleContentRect().y();
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_VTotalPixel:
 		{
-			*msg->opg_Storage = (ULONG) core(data->view->webView->mainFrame())->view()->contentsHeight();
+			*msg->opg_Storage = (IPTR) core(data->view->webView->mainFrame())->view()->contentsHeight();
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_VVisiblePixel:
 		{
-			*msg->opg_Storage = (ULONG) core(data->view->webView->mainFrame())->view()->visibleHeight();
+			*msg->opg_Storage = (IPTR) core(data->view->webView->mainFrame())->view()->visibleHeight();
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_HTopPixel:
 		{
-			*msg->opg_Storage = (ULONG) core(data->view->webView->mainFrame())->view()->visibleContentRect().x();
+			*msg->opg_Storage = (IPTR) core(data->view->webView->mainFrame())->view()->visibleContentRect().x();
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_HTotalPixel:
 		{
-			*msg->opg_Storage = (ULONG) core(data->view->webView->mainFrame())->view()->contentsWidth();
+			*msg->opg_Storage = (IPTR) core(data->view->webView->mainFrame())->view()->contentsWidth();
 		}
 		return TRUE;
 
 		case MA_OWBBrowser_HVisiblePixel:
 		{
-			*msg->opg_Storage = (ULONG) core(data->view->webView->mainFrame())->view()->visibleWidth(); 
+			*msg->opg_Storage = (IPTR) core(data->view->webView->mainFrame())->view()->visibleWidth(); 
 		}
 		return TRUE;
 	}
@@ -1793,7 +1793,7 @@ DEFMMETHOD(Setup)
 		data->ehnode.ehn_Events =  IDCMP_MOUSEBUTTONS | IDCMP_RAWKEY | IDCMP_MOUSEMOVE | IDCMP_CHANGEWINDOW;
 		data->ehnode.ehn_Priority = 1;
 		data->ehnode.ehn_Flags = MUI_EHF_GUIMODE;
-		DoMethod(_win(obj), MUIM_Window_AddEventHandler, (ULONG)&data->ehnode);
+		DoMethod(_win(obj), MUIM_Window_AddEventHandler, (IPTR)&data->ehnode);
 
 		data->added = TRUE;
 	}
@@ -1817,7 +1817,7 @@ DEFMMETHOD(Cleanup)
 
 	if(data->added)
 	{
-		DoMethod(_win(obj), MUIM_Window_RemEventHandler, (ULONG)&data->ehnode);
+		DoMethod(_win(obj), MUIM_Window_RemEventHandler, (IPTR)&data->ehnode);
 		data->added = FALSE;
 	}
 
@@ -2465,12 +2465,12 @@ DEFSMETHOD(OWBBrowser_WillCloseFrame)
 }
 
 #if OS(AROS)
-static void cancelled(struct Hook *hook, Object *popupwin, APTR *dummy)
+static void cancelled(struct Hook *hook, Object *popupwin, IPTR *dummy)
 {
     set(popupwin, MUIA_Window_Open, FALSE);
 }
 
-static void closed(struct Hook *hook, Object *popupwin, APTR *params)
+static void closed(struct Hook *hook, Object *popupwin, IPTR *params)
 {
     PopupMenuMorphOS *that = (PopupMenuMorphOS *)params[0];
     int itemCount = (int)params[1];
@@ -2798,7 +2798,7 @@ DEFMMETHOD(ContextMenuBuild)
 
 	data->menucontroller = &page->contextMenuController();
 
-	return (ULONG) data->contextmenu;
+	return (IPTR) data->contextmenu;
 }
 
 DEFMMETHOD(ContextMenuChoice)
@@ -3208,7 +3208,7 @@ DEFMMETHOD(CreateDragImage)
 		STRPTR url;
 
 		if (parent == NULL)
-			return NULL;
+			return (IPTR)NULL;
 
 		url = (STRPTR) getv(obj, MA_OWBBrowser_DragURL);
 
@@ -3415,7 +3415,7 @@ DEFMMETHOD(CreateDragImage)
 #endif
 	}
 
-	return (ULONG)di;
+	return (IPTR)di;
 }
 
 DEFMMETHOD(DeleteDragImage)
@@ -3598,7 +3598,7 @@ DEFMMETHOD(CreateShortHelp)
 		result = frame->eventHandler().hitTestResultAtPoint(point, false);
 		
 		if(!result.altDisplayString().isEmpty())
-			return (ULONG) utf8_to_local(result.altDisplayString().utf8().data());
+			return (IPTR) utf8_to_local(result.altDisplayString().utf8().data());
 	}
 	
 	return 0;
@@ -4039,7 +4039,7 @@ typedef struct
 // It has some sideeffects for pages that want to paint over plugin area
 DEFSMETHOD(Plugin_RenderRastPort)
 {
-	if(msg->src == NULL && msg->stride == NULL)
+	if((msg->src == NULL) && (msg->stride == 0))
 	{
 		PluginRect *npwindowrect = (PluginRect *) msg->windowrect;
 		IntRect windowrect(npwindowrect->x, npwindowrect->y, npwindowrect->width, npwindowrect->height);
@@ -4159,7 +4159,7 @@ DEFTMETHOD(Plugin_GetHeight)
 DEFSMETHOD(Plugin_GetSurface)
 {
 	GETDATA;
-	return (ULONG) data->view->cr;
+	return (IPTR) data->view->cr;
 }
 
 DEFTMETHOD(Plugin_IsBrowserActive)
@@ -4266,7 +4266,7 @@ DEFSMETHOD(Plugin_AddTimeOut)
 		timer->start(msg->delay);
 	}
 
-	return (ULONG) timer;
+	return (IPTR) timer;
 }
 
 DEFSMETHOD(Plugin_RemoveTimeOut)
diff --git Source/WebKit/mui/Api/MorphOS/owbgroupclass.cpp Source/WebKit/mui/Api/MorphOS/owbgroupclass.cpp
index f043ef9..d5f02d7 100755
--- Source/WebKit/mui/Api/MorphOS/owbgroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/owbgroupclass.cpp
@@ -48,7 +48,7 @@ DEFNEW
 		TAG_DONE
 	);
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 static void doset(APTR obj, struct Data *data, struct TagItem *tags)
@@ -93,19 +93,19 @@ DEFGET
 	{
 		case MA_OWBGroup_Browser:
 		{
-			*msg->opg_Storage = (ULONG) data->browser;
+			*msg->opg_Storage = (IPTR) data->browser;
 		}
 		return TRUE; 
 
 		case MA_OWBGroup_MediaControlsGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->mediacontrolsgroup;
+			*msg->opg_Storage = (IPTR) data->mediacontrolsgroup;
 		}
 		return TRUE;
 
 		case MA_OWBGroup_InspectorGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->inspectorgroup;
+			*msg->opg_Storage = (IPTR) data->inspectorgroup;
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/owbwindowclass.cpp Source/WebKit/mui/Api/MorphOS/owbwindowclass.cpp
index 00078a4..77d4357 100755
--- Source/WebKit/mui/Api/MorphOS/owbwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/owbwindowclass.cpp
@@ -172,10 +172,10 @@ struct Data
 Object *create_window(char * url, ULONG isframe, APTR sourceview, APTR features, ULONG privatebrowsing)
 {
 	return (Object *) NewObject(getowbwindowclass(), NULL,
-						MA_OWBBrowser_URL, (ULONG) url,
-						MA_OWBBrowser_IsFrame, (ULONG) isframe,
-                        MA_OWBBrowser_SourceView, (ULONG) sourceview,
-						MA_OWBWindow_Features, (ULONG) features,
+						MA_OWBBrowser_URL, (IPTR) url,
+						MA_OWBBrowser_IsFrame, (IPTR) isframe,
+                        MA_OWBBrowser_SourceView, (IPTR) sourceview,
+						MA_OWBWindow_Features, (IPTR) features,
 						MA_OWBBrowser_PrivateBrowsing, privatebrowsing,
 						TAG_DONE);
 }
@@ -334,7 +334,7 @@ DEFNEW
 	Object *menustrip;
 	//APTR n, m;
 	char id = 'W'; // Sigh, let's stay compatible with previous release, now the mistake is made :)
-	Object *initialbrowser = (Object *) GetTagData(MA_OWBWindow_InitialBrowser, NULL, msg->ops_AttrList);
+	Object *initialbrowser = (Object *) GetTagData(MA_OWBWindow_InitialBrowser, (IPTR)NULL, msg->ops_AttrList);
 	struct windownode *node = (struct windownode *) malloc(sizeof(struct windownode));
 
 	ULONG showseparators = getv(app, MA_OWBApp_ShowSeparators);
@@ -497,11 +497,11 @@ DEFNEW
 		else
 		{
 			DoMethod(obj, MM_OWBWindow_AddBrowser,
-					 (char *) GetTagData(MA_OWBBrowser_URL, NULL, msg->ops_AttrList),
-					 (ULONG)  GetTagData(MA_OWBBrowser_IsFrame, NULL, msg->ops_AttrList),
-					 (APTR)   GetTagData(MA_OWBBrowser_SourceView, NULL, msg->ops_AttrList),
+					 (char *) GetTagData(MA_OWBBrowser_URL, (IPTR)NULL, msg->ops_AttrList),
+					 (IPTR)  GetTagData(MA_OWBBrowser_IsFrame, (IPTR)NULL, msg->ops_AttrList),
+					 (APTR)   GetTagData(MA_OWBBrowser_SourceView, (IPTR)NULL, msg->ops_AttrList),
 					 FALSE,
-					 (ULONG)  GetTagData(MA_OWBBrowser_PrivateBrowsing, FALSE, msg->ops_AttrList),
+					 (IPTR)  GetTagData(MA_OWBBrowser_PrivateBrowsing, FALSE, msg->ops_AttrList),
 					 TRUE);
 		}
 
@@ -528,7 +528,7 @@ DEFNEW
 
 		ADDTAIL(&window_list, data->node);
 
-		return (ULONG)obj;
+		return (IPTR)obj;
 	}
 	else
 	{
@@ -549,7 +549,7 @@ DEFDISP
 	{
 		data->abort_completion = TRUE;
 		waitForThreadCompletion(data->completion_thread);
-		data->completion_thread = NULL;
+		data->completion_thread = (IPTR)NULL;
 	}
 
 	DoMethod((Object *) getv(app, MA_OWBApp_BookmarkWindow), MM_Bookmarkgroup_UnRegisterQLGroup, data->fastlinkgroup);
@@ -708,7 +708,7 @@ static void doset(APTR obj, struct Data *data, struct TagItem *tags)
 			/* Rather sucky handling, do something smarter */
 			case MA_OWBWindow_ShowBookmarkPanel:
 			{
-				ULONG show = tag->ti_Data;
+				IPTR show = tag->ti_Data;
 
 				data->historypanelgroup = NULL;
 
@@ -749,7 +749,7 @@ static void doset(APTR obj, struct Data *data, struct TagItem *tags)
 
 			case MA_OWBWindow_ShowHistoryPanel:
 			{
-				ULONG show = tag->ti_Data;
+				IPTR show = tag->ti_Data;
 
 				data->bookmarkpanelgroup = NULL;
 
@@ -832,79 +832,79 @@ DEFGET
 	{
 		case MA_OWBWindow_ActiveBrowser:
 		{
-			*msg->opg_Storage = (ULONG) data->active_browser;
+			*msg->opg_Storage = (IPTR) data->active_browser;
 		}
 		return TRUE;
 
 		case MA_OWBWindow_ActiveWebInspector:
 		{
-			*msg->opg_Storage = (ULONG) data->active_webinspector;
+			*msg->opg_Storage = (IPTR) data->active_webinspector;
 		}
 		return TRUE;
 
 		case MA_OWBWindow_FastLinkGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->fastlinkgroup;
+			*msg->opg_Storage = (IPTR) data->fastlinkgroup;
 		}
 		return TRUE;
 
 		case MA_OWBWindow_FastLinkParentGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->fastlinkparentgroup;
+			*msg->opg_Storage = (IPTR) data->fastlinkparentgroup;
 		}
 		return TRUE;
 
 		case MA_OWBWindow_NavigationGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->navigationgroup;
+			*msg->opg_Storage = (IPTR) data->navigationgroup;
 		}
 		return TRUE;
 
 		case MA_OWBWindow_AddressBarGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->addressbargroup;
+			*msg->opg_Storage = (IPTR) data->addressbargroup;
 		}
 		return TRUE;
 
 		case MA_OWBWindow_NetworkLedsGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->networkledsgroup;
+			*msg->opg_Storage = (IPTR) data->networkledsgroup;
 		}
 		return TRUE;
 
 		case MA_OWBWindow_SearchGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->searchgroup;
+			*msg->opg_Storage = (IPTR) data->searchgroup;
 		}
 		return TRUE;
 
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_Browser;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_Browser;
 		}
 		return TRUE;
 
 		case MA_OWBWindow_ShowBookmarkPanel:
 		{
-			*msg->opg_Storage = (ULONG) (data->bookmarkpanelgroup != NULL);
+			*msg->opg_Storage = (IPTR) (data->bookmarkpanelgroup != NULL);
 		}
 		return TRUE;
 
 		case MA_OWBWindow_ShowHistoryPanel:
 		{
-			*msg->opg_Storage = (ULONG) (data->historypanelgroup != NULL);
+			*msg->opg_Storage = (IPTR) (data->historypanelgroup != NULL);
 		}
 		return TRUE;
 
 		case MA_OWBWindow_BookmarkPanelGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->bookmarkpanelgroup;
+			*msg->opg_Storage = (IPTR) data->bookmarkpanelgroup;
 		}
 		return TRUE;
 
 		case MA_OWBWindow_HistoryPanelGroup:
 		{
-			*msg->opg_Storage = (ULONG) data->historypanelgroup;
+			*msg->opg_Storage = (IPTR) data->historypanelgroup;
 		}
 		return TRUE;
 	}
@@ -1129,7 +1129,7 @@ DEFSMETHOD(OWBWindow_MenuAction)
 
 		case MNA_NAVIGATION:
 		{
-			ULONG show;
+			IPTR show;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, MNA_NAVIGATION, MUIA_Menuitem_Checked, &show);
 			set(obj, MA_OWBWindow_ShowNavigationGroup, show);
 			break;
@@ -1137,7 +1137,7 @@ DEFSMETHOD(OWBWindow_MenuAction)
 
 		case MNA_QUICKLINKS:
 		{
-			ULONG show;
+			IPTR show;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, MNA_QUICKLINKS, MUIA_Menuitem_Checked, &show);
 			set(obj, MA_OWBWindow_ShowQuickLinkGroup, show);
 			break;
@@ -1145,7 +1145,7 @@ DEFSMETHOD(OWBWindow_MenuAction)
 
 		case MNA_LOCATION:
 		{
-			ULONG show;
+			IPTR show;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, MNA_LOCATION, MUIA_Menuitem_Checked, &show);
 			set(obj, MA_OWBWindow_ShowAddressBarGroup, show);
 			break;
@@ -1153,7 +1153,7 @@ DEFSMETHOD(OWBWindow_MenuAction)
 
 		case MNA_STATUS:
 		{
-			ULONG show;
+			IPTR show;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, MNA_STATUS, MUIA_Menuitem_Checked, &show);
 			set(obj, MA_OWBWindow_ShowStatusGroup, show);
 			break;
@@ -1161,7 +1161,7 @@ DEFSMETHOD(OWBWindow_MenuAction)
 
 		case MNA_FULLSCREEN:
 		{
-			ULONG fullscreen;
+			IPTR fullscreen;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, MNA_STATUS, MUIA_Menuitem_Checked, &fullscreen);
 			DoMethod(obj, MM_OWBWindow_FullScreen, fullscreen ? MV_OWBWindow_FullScreen_On : MV_OWBWindow_FullScreen_Off);
 			break;
@@ -1169,7 +1169,7 @@ DEFSMETHOD(OWBWindow_MenuAction)
 
 		case MNA_NO_PANEL:
 		{
-			ULONG show;
+			IPTR show;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, MNA_NO_PANEL, MUIA_Menuitem_Checked, &show);
 			set(obj, MA_OWBWindow_ShowBookmarkPanel, FALSE);
 			set(obj, MA_OWBWindow_ShowHistoryPanel, FALSE);
@@ -1180,7 +1180,7 @@ DEFSMETHOD(OWBWindow_MenuAction)
 
 		case MNA_BOOKMARK_PANEL:
 		{
-			ULONG show;
+			IPTR show;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, MNA_BOOKMARK_PANEL, MUIA_Menuitem_Checked, &show);
 			set(obj, MA_OWBWindow_ShowBookmarkPanel, show);
             DoMethod(obj, MM_OWBWindow_UpdatePanelGroup);
@@ -1190,7 +1190,7 @@ DEFSMETHOD(OWBWindow_MenuAction)
 
 		case MNA_HISTORY_PANEL:
 		{
-			ULONG show;
+			IPTR show;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, MNA_HISTORY_PANEL, MUIA_Menuitem_Checked, &show);
 			set(obj, MA_OWBWindow_ShowHistoryPanel, show);
             DoMethod(obj, MM_OWBWindow_UpdatePanelGroup);
@@ -1266,7 +1266,7 @@ DEFSMETHOD(OWBWindow_MenuAction)
 
 		case MNA_PRIVATE_BROWSING:
 		{
-			ULONG enabled;
+			IPTR enabled;
 			BalWidget *widget = (BalWidget *) getv(data->active_browser, MA_OWBBrowser_Widget);
 			
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, msg->action, MUIA_Menuitem_Checked, &enabled);
@@ -1280,12 +1280,12 @@ DEFSMETHOD(OWBWindow_MenuAction)
 		case MNA_SETTINGS_JAVASCRIPT_DISABLED:
 		case MNA_SETTINGS_JAVASCRIPT_DEFAULT:
 		{
-			ULONG enabled;
+			IPTR enabled;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, msg->action, MUIA_Menuitem_Checked, &enabled);
 
 			if(enabled)
 			{
-				ULONG value;
+				IPTR value;
 				BalWidget *widget = (BalWidget *) getv(data->active_browser, MA_OWBBrowser_Widget);
 
 				switch(msg->action)
@@ -1311,12 +1311,12 @@ DEFSMETHOD(OWBWindow_MenuAction)
 		case MNA_SETTINGS_IMAGES_DISABLED:
 		case MNA_SETTINGS_IMAGES_DEFAULT:
 		{
-			ULONG enabled;
+			IPTR enabled;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, msg->action, MUIA_Menuitem_Checked, &enabled);
 
 			if(enabled)
 			{
-				ULONG value;
+				IPTR value;
 				BalWidget *widget = (BalWidget *) getv(data->active_browser, MA_OWBBrowser_Widget);
 
 				switch(msg->action)
@@ -1342,12 +1342,12 @@ DEFSMETHOD(OWBWindow_MenuAction)
 		case MNA_SETTINGS_ANIMATIONS_DISABLED:
 		case MNA_SETTINGS_ANIMATIONS_DEFAULT:
 		{
-			ULONG enabled;
+			IPTR enabled;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, msg->action, MUIA_Menuitem_Checked, &enabled);
 
 			if(enabled)
 			{
-				ULONG value;
+				IPTR value;
 				BalWidget *widget = (BalWidget *) getv(data->active_browser, MA_OWBBrowser_Widget);
 
 				switch(msg->action)
@@ -1373,12 +1373,12 @@ DEFSMETHOD(OWBWindow_MenuAction)
 		case MNA_SETTINGS_PLUGINS_DISABLED:
 		case MNA_SETTINGS_PLUGINS_DEFAULT:
 		{
-			ULONG enabled;
+			IPTR enabled;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, msg->action, MUIA_Menuitem_Checked, &enabled);
 
 			if(enabled)
 			{
-				ULONG value;
+				IPTR value;
 				BalWidget *widget = (BalWidget *) getv(data->active_browser, MA_OWBBrowser_Widget);
 
 				switch(msg->action)
@@ -1402,7 +1402,7 @@ DEFSMETHOD(OWBWindow_MenuAction)
 
 		case MNA_SETTINGS_SPOOF_AS_DEFAULT:
 		{
-			ULONG enabled;
+			IPTR enabled;
 			DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, MNA_SETTINGS_SPOOF_AS_DEFAULT, MUIA_Menuitem_Checked, &enabled);
 
 			if(enabled)
@@ -1438,7 +1438,7 @@ DEFSMETHOD(OWBWindow_MenuAction)
 						// Set the new user agent for the webview
 						case MENUTYPE_SPOOF:
 						{
-							ULONG enabled;
+							IPTR enabled;
 							DoMethod((Object *)getv(obj, MUIA_Window_Menustrip), MUIM_GetUData, entry, MUIA_Menuitem_Checked, &enabled);
 
 							if(enabled)
@@ -1485,7 +1485,7 @@ DEFSMETHOD(OWBWindow_LoadURL)
 		// Handle possible shortcuts
 		if(spacepos != notFound)
 		{
-			ULONG res = FALSE;
+			IPTR res = FALSE;
 			String shortcut = url.left(spacepos);
 			String text = url.right(url.length() - (spacepos + 1));
 			char *converted_shortcut = utf8_to_local(shortcut.utf8().data());
@@ -2025,7 +2025,7 @@ DEFSMETHOD(OWBWindow_AddBrowser)
 		}
 	}
 
-	return (ULONG) widget;
+	return (IPTR) widget;
 }
 
 DEFSMETHOD(OWBWindow_RemoveBrowser)
@@ -2158,7 +2158,7 @@ DEFSMETHOD(OWBWindow_DetachBrowser)
 		if(!msg->window)
 		{
 			Object *window = (Object *) NewObject(getowbwindowclass(), NULL,
-										MA_OWBWindow_InitialBrowser, (ULONG) msg->browser,
+										MA_OWBWindow_InitialBrowser, (IPTR) msg->browser,
 										TAG_DONE);
 
 			if(window)
@@ -2287,7 +2287,7 @@ DEFSMETHOD(OWBWindow_CreateInspector)
 		}
 	}
 
-	return (ULONG) widget;
+	return (IPTR) widget;
 	
 	//return 0;
 }
@@ -2341,7 +2341,7 @@ DEFSMETHOD(OWBWindow_ActivePage)
 
 			SetAttrs(data->navigationgroup,
 					 MA_TransferAnim_Animate, getv(data->active_browser, MA_OWBBrowser_Loading),
-				     MA_Navigation_BackForwardList, (ULONG) ((WebView *) ((BalWidget *)getv(data->active_browser, MA_OWBBrowser_Widget))->webView)->backForwardList(),
+				     MA_Navigation_BackForwardList, (IPTR) ((WebView *) ((BalWidget *)getv(data->active_browser, MA_OWBBrowser_Widget))->webView)->backForwardList(),
 			         TAG_DONE);
 
 			SetAttrs(data->progressgroup, MUIA_Group_ActivePage, getv(data->active_browser, MA_OWBBrowser_Loading) ? 1 : 0, TAG_DONE);
@@ -2674,7 +2674,7 @@ DEFSMETHOD(OWBWindow_UpdateMenu)
 	{
 		Object *strip = (Object *) getv(obj, MUIA_Window_Menustrip);
 		Object *menu = NULL;
-		ULONG userdata = 0;
+		IPTR userdata = 0;
 
 		DoMethod(strip, MUIM_Menustrip_InitChange);
 
@@ -2767,7 +2767,7 @@ DEFSMETHOD(OWBWindow_UpdateMenu)
 		{
 			struct menu_entry *menu_entry = (struct menu_entry *) muiUserData(child);
 
-			if(menu_entry && ((LONG) menu_entry > MNA_DUMMY) && menu_entry->type == MENUTYPE_SPOOF)
+			if(menu_entry && ((SIPTR) menu_entry > MNA_DUMMY) && menu_entry->type == MENUTYPE_SPOOF)
 			{
 				if(useragent == String((char *) menu_entry->data))
 				{
@@ -2925,9 +2925,9 @@ DEFSMETHOD(OWBWindow_JavaScriptPrompt)
         End;
 
     if (!req_wnd)
-        return NULL;
+        return (IPTR)NULL;
 
-	DoMethod(_app(obj), OM_ADDMEMBER, req_wnd);
+    DoMethod(_app(obj), OM_ADDMEMBER, req_wnd);
 
     DoMethod(bt_cancel, MUIM_Notify, MUIA_Pressed, FALSE,
 		_app(obj), 2, MUIM_Application_ReturnID, 1);
@@ -2935,18 +2935,18 @@ DEFSMETHOD(OWBWindow_JavaScriptPrompt)
     DoMethod(bt_ok, MUIM_Notify, MUIA_Pressed, FALSE,
 		_app(obj), 2, MUIM_Application_ReturnID, 2);
 
-	set(req_wnd, MUIA_Window_ActiveObject, /*bt_ok*/str);
+    set(req_wnd, MUIA_Window_ActiveObject, /*bt_ok*/str);
     set(req_wnd, MUIA_Window_Open, TRUE);
 
     LONG result = -1;
 
-	if (getv(req_wnd, MUIA_Window_Open))
+    if (getv(req_wnd, MUIA_Window_Open))
     {
         ULONG sigs = 0;
 
         while (result == -1)
         {
-			ULONG ret = DoMethod(_app(obj), MUIM_Application_NewInput, &sigs);
+            IPTR ret = DoMethod(_app(obj), MUIM_Application_NewInput, &sigs);
             if(ret == 1 || ret == 2)
             {
                 result = ret;
@@ -2960,16 +2960,16 @@ DEFSMETHOD(OWBWindow_JavaScriptPrompt)
 
     if (result == 2)
     {
-		STRPTR value = (STRPTR) getv(str, MUIA_String_Contents);
+        STRPTR value = (STRPTR) getv(str, MUIA_String_Contents);
         if(value)
-			answer = strdup(value);
+            answer = strdup(value);
     }
 
     set(req_wnd, MUIA_Window_Open, FALSE);
-	DoMethod(_app(obj), OM_REMMEMBER, req_wnd);
+    DoMethod(_app(obj), OM_REMMEMBER, req_wnd);
     MUI_DisposeObject(req_wnd);
 
-	return (ULONG) answer;
+    return (IPTR) answer;
 }
 
 /* AutoCompletion */
diff --git Source/WebKit/mui/Api/MorphOS/passwordmanagergroupclass.cpp Source/WebKit/mui/Api/MorphOS/passwordmanagergroupclass.cpp
index c097848..16cf790 100644
--- Source/WebKit/mui/Api/MorphOS/passwordmanagergroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/passwordmanagergroupclass.cpp
@@ -84,7 +84,7 @@ DEFNEW
 		DoMethod(obj, MM_PasswordManagerGroup_Load);
 	}
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -452,7 +452,7 @@ DEFSMETHOD(PasswordManagerGroup_Get)
 	String *host = (String *) msg->host;
 	ExtCredential *credential = credentialMap.get(*host);
 
-	return (ULONG) credential;
+	return (IPTR) credential;
 }
 
 
diff --git Source/WebKit/mui/Api/MorphOS/passwordmanagerlistclass.cpp Source/WebKit/mui/Api/MorphOS/passwordmanagerlistclass.cpp
index 20f48de..7ecadc5 100644
--- Source/WebKit/mui/Api/MorphOS/passwordmanagerlistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/passwordmanagerlistclass.cpp
@@ -73,7 +73,7 @@ DEFNEW
 		data->cmenu = NULL;
 	}
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -89,7 +89,7 @@ DEFDISP
 DEFMMETHOD(List_Construct)
 {
 	// Built by caller
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
@@ -168,7 +168,7 @@ DEFMMETHOD(ContextMenuBuild)
 
 	if (DoMethod(obj, MUIM_List_TestPos, msg->mx, msg->my, &res) && (res.entry != -1))
 	{
-		DoMethod(obj, MUIM_List_GetEntry, res.entry, (ULONG *)&e);
+		DoMethod(obj, MUIM_List_GetEntry, res.entry, (IPTR *)&e);
 
 		if(e)
 		{
@@ -190,18 +190,18 @@ DEFMMETHOD(ContextMenuBuild)
 	            End;
 		}
 	}
-	return (ULONG)data->cmenu;
+	return (IPTR)data->cmenu;
 }
 
 DEFMMETHOD(ContextMenuChoice)
 {
 	struct credential_entry *e = NULL;
 
-	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (ULONG *)&e);
+	DoMethod(obj, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, (IPTR *)&e);
 
 	if(e)
 	{
-		ULONG udata = muiUserData(msg->item);
+		IPTR udata = muiUserData(msg->item);
 
 		switch(udata)
 		{
diff --git Source/WebKit/mui/Api/MorphOS/passwordmanagerwindowclass.cpp Source/WebKit/mui/Api/MorphOS/passwordmanagerwindowclass.cpp
index 9434bb3..1832874 100644
--- Source/WebKit/mui/Api/MorphOS/passwordmanagerwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/passwordmanagerwindowclass.cpp
@@ -74,7 +74,7 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_PasswordManager;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_PasswordManager;
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/popstringclass.cpp Source/WebKit/mui/Api/MorphOS/popstringclass.cpp
index 1dc3e99..9de2673 100755
--- Source/WebKit/mui/Api/MorphOS/popstringclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/popstringclass.cpp
@@ -163,15 +163,15 @@ DEFGET
 	switch (msg->opg_AttrID)
 	{
 		case MUIA_Popobject_Object:
-            *msg->opg_Storage = (ULONG) data->lv_entries;
+            *msg->opg_Storage = (IPTR) data->lv_entries;
             return TRUE;
 
 		case MUIA_Popstring_String:
-			*msg->opg_Storage = (ULONG) data->str;
+			*msg->opg_Storage = (IPTR) data->str;
 			return TRUE;
 
 		case MUIA_String_Contents:
-			return GetAttr(MUIA_String_Contents, data->str, (ULONGPTR)msg->opg_Storage);
+			return GetAttr(MUIA_String_Contents, data->str, (IPTR *)msg->opg_Storage);
 	}
 
 	return DOSUPER;
diff --git Source/WebKit/mui/Api/MorphOS/prefswindowclass.cpp Source/WebKit/mui/Api/MorphOS/prefswindowclass.cpp
index 2b6233f..addc959 100755
--- Source/WebKit/mui/Api/MorphOS/prefswindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/prefswindowclass.cpp
@@ -234,7 +234,7 @@ STATIC CONST int proxy_values[] =
     CURLPROXY_SOCKS4A,
     CURLPROXY_SOCKS5,
     CURLPROXY_SOCKS5_HOSTNAME,
-    NULL,
+    0,
 };
 
 struct useragent_pair
@@ -351,7 +351,7 @@ static void cycles_init(void)
 		STRPTR *current = (STRPTR *)*ptr;
 		while(*current)
 		{
-			*current = (STRPTR)GSI((ULONG)*current);
+			*current = (STRPTR)GSI((IPTR)*current);
 			current++;
 		}
 		ptr++;
@@ -1162,91 +1162,91 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_Settings;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_Settings;
 		}
 		return TRUE;
 
 		case MA_OWBApp_DefaultURL:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_homepage, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_homepage, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_OWBApp_StartPage:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_startpage, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_startpage, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_OWBApp_NewTabPage:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_newtabpage, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_newtabpage, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_OWBApp_CLIDevice:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_clidevice, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_clidevice, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_OWBApp_ShowButtonFrame:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_showbuttonframe, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_showbuttonframe, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnablePointers:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_enablepointers, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_enablepointers, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_ShowSearchBar:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_showsearch, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_showsearch, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_ShowValidationButtons:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_showvalidationbuttons, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_showvalidationbuttons, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_ShowSeparators:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_showseparators, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_showseparators, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableTabTransferAnim:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_showtabtransferanim, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_showtabtransferanim, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_NewPagePolicy:
 		{
-			*msg->opg_Storage = (ULONG) (getv(data->cy_newpagepolicy, MUIA_Cycle_Active) == 0) ? MV_OWBApp_NewPagePolicy_Tab : MV_OWBApp_NewPagePolicy_Window;
+			*msg->opg_Storage = (IPTR) (getv(data->cy_newpagepolicy, MUIA_Cycle_Active) == 0) ? MV_OWBApp_NewPagePolicy_Tab : MV_OWBApp_NewPagePolicy_Window;
 		}
 		return TRUE;
 
 		case MA_OWBApp_PopupPolicy:
 		{
-			*msg->opg_Storage = (ULONG) (getv(data->cy_popuppolicy, MUIA_Cycle_Active) == 0) ? MV_OWBApp_NewPagePolicy_Tab : MV_OWBApp_NewPagePolicy_Window;
+			*msg->opg_Storage = (IPTR) (getv(data->cy_popuppolicy, MUIA_Cycle_Active) == 0) ? MV_OWBApp_NewPagePolicy_Tab : MV_OWBApp_NewPagePolicy_Window;
 		}
 		return TRUE;
 
 		case MA_OWBApp_NewPagePosition:
 		{
-			*msg->opg_Storage = (ULONG) (getv(data->cy_newpageposition, MUIA_Cycle_Active) == 0) ? MV_OWBApp_NewPagePosition_Last : MV_OWBApp_NewPagePosition_After_Active;
+			*msg->opg_Storage = (IPTR) (getv(data->cy_newpageposition, MUIA_Cycle_Active) == 0) ? MV_OWBApp_NewPagePosition_Last : MV_OWBApp_NewPagePosition_After_Active;
 		}
 		return TRUE;
 
 		case MA_OWBApp_ToolButtonType:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->cy_toolbuttontype, MUIA_Cycle_Active);
+			*msg->opg_Storage = (IPTR) getv(data->cy_toolbuttontype, MUIA_Cycle_Active);
 		}
 		return TRUE;
 
@@ -1273,13 +1273,13 @@ DEFGET
 
 		case MA_OWBApp_CloseRequester:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->cy_closerequester, MUIA_Cycle_Active);
+			*msg->opg_Storage = (IPTR) getv(data->cy_closerequester, MUIA_Cycle_Active);
 		}
 		return TRUE;
 
 		case MA_OWBApp_ErrorMode:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->cy_errorreporting, MUIA_Cycle_Active) ? MV_OWBApp_ErrorMode_Page : MV_OWBApp_ErrorMode_Requester;
+			*msg->opg_Storage = (IPTR) getv(data->cy_errorreporting, MUIA_Cycle_Active) ? MV_OWBApp_ErrorMode_Page : MV_OWBApp_ErrorMode_Requester;
 		}
 		return TRUE;
 
@@ -1303,7 +1303,7 @@ DEFGET
 
 		case MA_OWBApp_ShowFavIcons:
 		{
-			ULONG value = 0;
+			IPTR value = 0;
 			value |= getv(data->ch_favicon_tab, MUIA_Selected) ? MV_OWBApp_ShowFavIcons_Tab : 0;
 			value |= getv(data->ch_favicon_bookmark, MUIA_Selected) ? MV_OWBApp_ShowFavIcons_Bookmark : 0;
 			value |= getv(data->ch_favicon_history, MUIA_Selected) ? MV_OWBApp_ShowFavIcons_History : 0;
@@ -1331,7 +1331,7 @@ DEFGET
 
 		case MA_OWBApp_QuickLinkRows:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->sl_quicklinkrows, MUIA_Slider_Level);
+			*msg->opg_Storage = (IPTR) getv(data->sl_quicklinkrows, MUIA_Slider_Level);
 		}
 		return TRUE;
 
@@ -1361,346 +1361,346 @@ DEFGET
 
 		case MA_OWBApp_EnablePageCache:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_enablepagecache, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_enablepagecache, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_CacheModel:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->cy_cachemodel, MUIA_Cycle_Active);
+			*msg->opg_Storage = (IPTR) getv(data->cy_cachemodel, MUIA_Cycle_Active);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableJavaScript:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_enablejavascript, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_enablejavascript, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_AllowJavaScriptNewWindow:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_allowjavascriptnewwindow, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_allowjavascriptnewwindow, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableAnimation:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_enableanimation, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_enableanimation, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableAnimationLoop:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_enableanimationloop, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_enableanimationloop, MUIA_Selected);
 		}
 		return TRUE;
 		/*
 		case MA_OWBApp_AnimationPolicy:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->cy_animationpolicy, MUIA_Cycle_Active);
+			*msg->opg_Storage = (IPTR) getv(data->cy_animationpolicy, MUIA_Cycle_Active);
 		}
 		return TRUE;
 		*/
 		case MA_OWBApp_LoadImagesAutomatically:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_enableimages, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_enableimages, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_ShouldPrintBackgrounds:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_shouldprintbackground, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_shouldprintbackground, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableContentBlocking:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_contentblocking, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_contentblocking, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnablePlugins:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_enableplugins, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_enableplugins, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableInspector:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_enableinspector, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_enableinspector, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_DownloadDirectory:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_dldir, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_dldir, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_OWBApp_DownloadAutoClose:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_downloadautoclose, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_downloadautoclose, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_DownloadSave:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_savedownloads, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_savedownloads, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_DownloadStartAutomatically:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_downloadstartautomatically, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_downloadstartautomatically, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_DefaultFontSize:
 		{
-			*msg->opg_Storage = (ULONG) atoi((char *) getv(data->str_defaultfontsize, MUIA_String_Contents));
+			*msg->opg_Storage = (IPTR) atoi((char *) getv(data->str_defaultfontsize, MUIA_String_Contents));
 		}
 		return TRUE;
 
 		case MA_OWBApp_DefaultFixedFontSize:
 		{
-			*msg->opg_Storage = (ULONG) atoi((char *) getv(data->str_defaultfixedfontsize, MUIA_String_Contents));
+			*msg->opg_Storage = (IPTR) atoi((char *) getv(data->str_defaultfixedfontsize, MUIA_String_Contents));
 		}
 		return TRUE;
 
 		case MA_OWBApp_MinimumFontSize:
 		{
-			*msg->opg_Storage = (ULONG) atoi((char *) getv(data->str_minimumfontsize, MUIA_String_Contents));
+			*msg->opg_Storage = (IPTR) atoi((char *) getv(data->str_minimumfontsize, MUIA_String_Contents));
 		}
 		return TRUE;
 
 		case MA_OWBApp_MinimumLogicalFontSize:
 		{
-			*msg->opg_Storage = (ULONG) atoi((char *) getv(data->str_minimumlogicalfontsize, MUIA_String_Contents));
+			*msg->opg_Storage = (IPTR) atoi((char *) getv(data->str_minimumlogicalfontsize, MUIA_String_Contents));
 		}
 		return TRUE;
 
 		case MA_OWBApp_TextEncoding:
 		{
-			ULONG i = getv(data->cy_textencoding, MUIA_Cycle_Active);
-			*msg->opg_Storage = (ULONG) textencodings[i];
+			IPTR i = getv(data->cy_textencoding, MUIA_Cycle_Active);
+			*msg->opg_Storage = (IPTR) textencodings[i];
 		}
 		return TRUE;
 
 		case MA_OWBApp_SmoothingType:
 		{
-			*msg->opg_Storage = getv(data->cy_fontsmoothing, MUIA_Cycle_Active) == 0 ? (ULONG) FontSmoothingTypeMedium : (ULONG) FontSmoothingTypeWindows;
+			*msg->opg_Storage = getv(data->cy_fontsmoothing, MUIA_Cycle_Active) == 0 ? (ULONG) FontSmoothingTypeMedium : (IPTR) FontSmoothingTypeWindows;
 		}
 		return TRUE;
 
 		case MA_OWBApp_SansSerifFontFamily:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_sansseriffamily, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_sansseriffamily, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_OWBApp_SerifFontFamily:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_seriffamily, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_seriffamily, MUIA_String_Contents);
 		}
 		return TRUE;
 		
 		case MA_OWBApp_StandardFontFamily:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_standardfamily, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_standardfamily, MUIA_String_Contents);
 		}
 		return TRUE;
 		
 		case MA_OWBApp_CursiveFontFamily:
 		{			 
-			*msg->opg_Storage = (ULONG) getv(data->str_cursivefamily, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_cursivefamily, MUIA_String_Contents);
 		}
 		return TRUE;
 		
 		case MA_OWBApp_FantasyFontFamily:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_fantasyfamily, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_fantasyfamily, MUIA_String_Contents);
 		}
 		return TRUE;
 		
 		case MA_OWBApp_FixedFontFamily:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_fixedfamily, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_fixedfamily, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_OWBApp_ActiveConnections:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->sl_connections,  MUIA_Slider_Level);
+			*msg->opg_Storage = (IPTR) getv(data->sl_connections,  MUIA_Slider_Level);
 		}
 		return TRUE;
 
 		case MA_OWBApp_UserAgent:
 		{
-			*msg->opg_Storage = (ULONG) useragents_strings[getv(data->cy_useragent, MUIA_Cycle_Active)];
+			*msg->opg_Storage = (IPTR) useragents_strings[getv(data->cy_useragent, MUIA_Cycle_Active)];
 		}
 		return TRUE;
 
 		case MA_OWBApp_ProxyEnabled:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_proxyenabled, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_proxyenabled, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_ProxyType:
 		{
-			*msg->opg_Storage = (ULONG) proxy_values[getv(data->cy_proxytype, MUIA_Cycle_Active)];
+			*msg->opg_Storage = (IPTR) proxy_values[getv(data->cy_proxytype, MUIA_Cycle_Active)];
 		}
 		return TRUE;
 
 		case MA_OWBApp_ProxyHost:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_proxyhost, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_proxyhost, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_OWBApp_ProxyPort:
 		{
-			*msg->opg_Storage = (ULONG) atoi((char *) getv(data->str_proxyport, MUIA_String_Contents));
+			*msg->opg_Storage = (IPTR) atoi((char *) getv(data->str_proxyport, MUIA_String_Contents));
 		}
 		return TRUE;
 
 		case MA_OWBApp_ProxyUsername:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_proxyusername, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_proxyusername, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_OWBApp_ProxyPassword:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_proxypassword, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_proxypassword, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_OWBApp_SaveSession:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_savesession, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_savesession, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_DeleteSessionAtExit:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_deletesessionatexit, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_deletesessionatexit, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_SessionRestoreMode:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->cy_sessionrestore, MUIA_Cycle_Active);
+			*msg->opg_Storage = (IPTR) getv(data->cy_sessionrestore, MUIA_Cycle_Active);
 		}
 		return TRUE;
 
 		/*
 		case MA_OWBApp_PersistantCookiesPolicy:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->cy_persistantcookiespolicy, MUIA_Cycle_Active);
+			*msg->opg_Storage = (IPTR) getv(data->cy_persistantcookiespolicy, MUIA_Cycle_Active);
 		}
 		return TRUE;
 
 		case MA_OWBApp_TemporaryCookiesPolicy:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->cy_temporarycookiespolicy, MUIA_Cycle_Active);
+			*msg->opg_Storage = (IPTR) getv(data->cy_temporarycookiespolicy, MUIA_Cycle_Active);
 		}
 		return TRUE;
 		*/
 
 		case MA_OWBApp_SaveCookies:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_savecookies, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_savecookies, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_CookiesPolicy:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->cy_cookiespolicy, MUIA_Cycle_Active);
+			*msg->opg_Storage = (IPTR) getv(data->cy_cookiespolicy, MUIA_Cycle_Active);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableLocalStorage:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_enablelocalstorage, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_enablelocalstorage, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_SaveHistory:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_savehistory, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_savehistory, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_HistoryItemLimit:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->sl_historyitems, MUIA_Slider_Level);
+			*msg->opg_Storage = (IPTR) getv(data->sl_historyitems, MUIA_Slider_Level);
 		}
 		return TRUE;
 
 		case MA_OWBApp_HistoryAgeInDaysLimit:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->sl_historymaxage, MUIA_Slider_Level);
+			*msg->opg_Storage = (IPTR) getv(data->sl_historymaxage, MUIA_Slider_Level);
 		}
 		return TRUE;
 
 		case MA_OWBApp_SaveFormCredentials:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_savecredentials, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_savecredentials, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableFormAutofill:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_formautofill, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_formautofill, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_CertificatePath:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->str_certificatepath, MUIA_String_Contents);
+			*msg->opg_Storage = (IPTR) getv(data->str_certificatepath, MUIA_String_Contents);
 		}
 		return TRUE;
 
 		case MA_OWBApp_IgnoreSSLErrors:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_ignoresslerrors, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_ignoresslerrors, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_LoopFilterMode:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->cy_loopfilter, MUIA_Cycle_Active);
+			*msg->opg_Storage = (IPTR) getv(data->cy_loopfilter, MUIA_Cycle_Active);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableVP8:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_webm, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_webm, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableFLV:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_flv, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_flv, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableOgg:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_ogg, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_ogg, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnableMP4:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_mp4, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_mp4, MUIA_Selected);
 		}
 		return TRUE;
 
 		case MA_OWBApp_EnablePartialContent:
 		{
-			*msg->opg_Storage = (ULONG) getv(data->ch_partialcontent, MUIA_Selected);
+			*msg->opg_Storage = (IPTR) getv(data->ch_partialcontent, MUIA_Selected);
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/printerwindowclass.cpp Source/WebKit/mui/Api/MorphOS/printerwindowclass.cpp
index 949a47e..9fba8b5 100755
--- Source/WebKit/mui/Api/MorphOS/printerwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/printerwindowclass.cpp
@@ -225,13 +225,13 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_Printer;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_Printer;
 		}
 		return TRUE;
 
 		case MA_OWB_Browser:
 		{
-			*msg->opg_Storage = (ULONG) data->browser;
+			*msg->opg_Storage = (IPTR) data->browser;
 		}
 		return TRUE;
 	}
@@ -431,7 +431,9 @@ DEFTMETHOD(PrinterWindow_Start)
 				}
 				else
 				{
+#if (0)
 					MUI_Request(app, obj, 0, GSI(MSG_REQUESTER_ERROR_TITLE), GSI(MSG_PRINTERWINDOW_ERROR), TAG_DONE);
+#endif
 				}
 
 				printContext.end();
@@ -459,7 +461,7 @@ DEFTMETHOD(PrinterWindow_Start)
 					if(!(OpenDevice((STRPTR)"printer.device", 0, (struct IORequest *)PIO, 0)))
 					{
 						PD = (struct PrinterData *)PIO->iodrp.io_Device;
-						TP_Installed = (((ULONG *)(PD->pd_OldStk))[2] == TPMATCHWORD);
+						TP_Installed = (((IPTR *)(PD->pd_OldStk))[2] == TPMATCHWORD);
 						TPVersion = PIO->iodrp.io_Device->dd_Library.lib_Version;
 
 						if(TP_Installed && TPVersion >= 39)
@@ -546,7 +548,7 @@ DEFTMETHOD(PrinterWindow_Start)
 							pctx->PIO->iodrp.io_Special = SPECIAL_MILROWS | SPECIAL_MILCOLS; 	// save aspect ratio of picture,
 																								// turn on inches input for above fields
 							// new: io.Modes must point to a new Structure (ExtIoDrp)
-							pctx->PIO->iodrp.io_Modes = (ULONG)&pctx->ExtIoDrp;
+							pctx->PIO->iodrp.io_Modes = (IPTR)&pctx->ExtIoDrp;
 
 							// fill in the new structure
 							pctx->ExtIoDrp.PixAspX = 1;   // for the correct aspect ratio
diff --git Source/WebKit/mui/Api/MorphOS/quicklinkbuttongroupclass.cpp Source/WebKit/mui/Api/MorphOS/quicklinkbuttongroupclass.cpp
index ec47ce6..9fb12c3 100755
--- Source/WebKit/mui/Api/MorphOS/quicklinkbuttongroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/quicklinkbuttongroupclass.cpp
@@ -176,7 +176,7 @@ DEFNEW
         }
 	}
 
-	if (!tmp.node) return (NULL);
+	if (!tmp.node) return (IPTR)NULL;
 
 	if ((tmp.node->alias) && (*tmp.node->alias!='\0'))
 	{
@@ -193,7 +193,7 @@ DEFNEW
 
 	tmp.title = (STRPTR)malloc(strlen(title)+1);
 
-	if (!tmp.title) return (NULL);
+	if (!tmp.title) return (IPTR)NULL;
 
 	strcpy(tmp.title,title);
 
@@ -238,7 +238,7 @@ DEFNEW
 		}
 
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 
@@ -277,13 +277,13 @@ DEFGET
 
 		case MA_OWB_URL:
 		{
-			*msg->opg_Storage = (ULONG) data->node->address;
+			*msg->opg_Storage = (IPTR) data->node->address;
 		}
 		return TRUE;
 
 		case MA_QuickLinkGroup_Mode:
 		{
-			*msg->opg_Storage = (ULONG) data->mode;
+			*msg->opg_Storage = (IPTR) data->mode;
 		}
 		return TRUE;
 	}
@@ -335,7 +335,7 @@ struct popupmenu_entry
 	APTR icon;
 };
 
-static ULONG build_menu(Object *menu, Object *lt, struct MUIS_Listtree_TreeNode *list, struct MinList *menuentry_list)
+static IPTR build_menu(Object *menu, Object *lt, struct MUIS_Listtree_TreeNode *list, struct MinList *menuentry_list)
 {
 	struct MUIS_Listtree_TreeNode *tn;
 	struct treedata *node;
@@ -403,7 +403,7 @@ static ULONG build_menu(Object *menu, Object *lt, struct MUIS_Listtree_TreeNode
 								  MUIA_Weight, 0,
 								  TAG_DONE);
 
-								snprintf(label, sizeof(label), "\033O[%08lx] %s", (ULONG) entry->icon, truncatedTitle.latin1().data());
+								snprintf(label, sizeof(label), "\033O[%08lx] %s", (IPTR) entry->icon, truncatedTitle.latin1().data());
 							}
 							else
 							{
@@ -475,7 +475,7 @@ DEFTMETHOD(QuickLinkButtonGroup_BuildMenu)
 	{
 		if(data->node->treenode)
 		{
-			ULONG rc;
+			IPTR rc;
 			ULONG count = 0;
 			APTR n, m;
             struct MinList menuentry_list;
@@ -613,13 +613,13 @@ DEFMMETHOD(ContextMenuBuild)
 			End,
 		End;
 	
-	return (ULONG)data->cMenu;
+	return (IPTR)data->cMenu;
 }
 
 DEFMMETHOD(ContextMenuChoice)
 {
 	GETDATA;
-	ULONG udata = muiUserData(msg->item);
+	IPTR udata = muiUserData(msg->item);
 
 	switch (udata)
     {
@@ -651,7 +651,7 @@ DEFMMETHOD(ContextMenuChoice)
 		default:
 			;
     }
-    return (ULONG)NULL;
+    return (IPTR)NULL;
 }
 
 DEFMMETHOD(CreateShortHelp)
@@ -667,7 +667,7 @@ DEFMMETHOD(CreateShortHelp)
 		if (help)
 		{
 			sprintf(help, "%s\n%s", data->node->title, data->node->address);
-			return ((ULONG)help);
+			return ((IPTR)help);
 		}
 	}
 	return (0);
diff --git Source/WebKit/mui/Api/MorphOS/quicklinkgroupclass.cpp Source/WebKit/mui/Api/MorphOS/quicklinkgroupclass.cpp
index 7228705..a49ee51 100755
--- Source/WebKit/mui/Api/MorphOS/quicklinkgroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/quicklinkgroupclass.cpp
@@ -37,7 +37,7 @@
 #include "bookmarkgroupclass.h"
 
 #ifndef get
-#define get(obj,attr,store) GetAttr(attr,obj,(ULONGPTR)store)
+#define get(obj,attr,store) GetAttr(attr,obj,(IPTR *)store)
 #endif
 
 #define D(x)
@@ -112,7 +112,7 @@ static void doset(Object *obj, struct Data *data, struct TagItem *tags)
 	NEXTTAG
 }
 
-static ULONG LayoutFonc( struct Hook *hook, Object *obj, struct MUI_LayoutMsg *lm )
+static IPTR LayoutFonc( struct Hook *hook, Object *obj, struct MUI_LayoutMsg *lm )
 {
 	struct Data *data=NULL;
 	
@@ -136,7 +136,7 @@ static ULONG LayoutFonc( struct Hook *hook, Object *obj, struct MUI_LayoutMsg *l
 			
 			get(obj, MA_QuickLinkGroup_Data, &data);
 	
-			D(kprintf("### QuickLinkGroup MinMax Data: %08lx:\n",(ULONG)data));
+			D(kprintf("### QuickLinkGroup MinMax Data: %08lx:\n",(IPTR)data));
 			if (!data) return(FALSE);    
 
 			//get(obj, MUIA_Group_HorizSpacing, &data->hspace);
@@ -232,7 +232,7 @@ static ULONG LayoutFonc( struct Hook *hook, Object *obj, struct MUI_LayoutMsg *l
 			
 			get(obj, MA_QuickLinkGroup_Data, &data);
 			
-			D(kprintf("### QuickLinkGroup Layout Data: %08lx:\n",(ULONG)data));
+			D(kprintf("### QuickLinkGroup Layout Data: %08lx:\n",(IPTR)data));
 			if (!data) return(FALSE);    
 			//D(kprintf("Layout Width=%ld Button_w=%ld Hspace=%ld\n", lm->lm_Layout.Width, data->button_w, data->hspace));
 
@@ -479,7 +479,7 @@ static ULONG LayoutFonc( struct Hook *hook, Object *obj, struct MUI_LayoutMsg *l
 			return(TRUE);
 		}
 	}
-	return((ULONG)MUILM_UNKNOWN);
+	return((IPTR)MUILM_UNKNOWN);
 }
 
 static struct Hook LayoutFonc_hook = {
@@ -518,7 +518,7 @@ DEFNEW
 		data->ehnode.ehn_Flags    = MUI_EHF_GUIMODE;
 		*/
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -534,7 +534,7 @@ DEFGET
 	{
 		case MA_QuickLinkGroup_Data:
 		{
-			*msg->opg_Storage = (ULONG)data;
+			*msg->opg_Storage = (IPTR)data;
 			return (TRUE);
 		}
 		case MA_QuickLinkGroup_Mode:
@@ -650,7 +650,7 @@ DEFSMETHOD(QuickLinkGroup_Add)
 
 	button=(Object *)NewObject(getquicklinkbuttongroupclass(), NULL,
 		MA_QuickLinkGroup_Mode, data->mode,
-		MA_QuickLinkButtonGroup_Node, (ULONG)msg->td,
+		MA_QuickLinkButtonGroup_Node, (IPTR)msg->td,
 		End;
 
 	if (button) DoMethod(obj, MUIM_Group_AddTail, button);
diff --git Source/WebKit/mui/Api/MorphOS/quicklinkparentgroupclass.cpp Source/WebKit/mui/Api/MorphOS/quicklinkparentgroupclass.cpp
index f10df5e..de924e2 100755
--- Source/WebKit/mui/Api/MorphOS/quicklinkparentgroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/quicklinkparentgroupclass.cpp
@@ -38,7 +38,7 @@
 #include "bookmarkgroupclass.h"
 
 #ifndef get
-#define get(obj,attr,store) GetAttr(attr,obj,(ULONGPTR)store)
+#define get(obj,attr,store) GetAttr(attr,obj,(IPTR *)store)
 #endif
 
 //#define D(x)
@@ -55,7 +55,7 @@ extern Object *app;
 #define D(x)
 #define LOC(a,b) (b)
 
-static ULONG LayoutFonc( struct Hook *hook, Object *obj, struct MUI_LayoutMsg *lm )
+static IPTR LayoutFonc( struct Hook *hook, Object *obj, struct MUI_LayoutMsg *lm )
 {
 	//struct Data *data=NULL;
 	
@@ -174,7 +174,7 @@ static ULONG LayoutFonc( struct Hook *hook, Object *obj, struct MUI_LayoutMsg *l
 			return (TRUE);
 		}
 	}
-	return((ULONG)MUILM_UNKNOWN);
+	return((IPTR)MUILM_UNKNOWN);
 }
 
 static struct Hook LayoutFonc_hook = {
@@ -293,7 +293,7 @@ DEFNEW
 		data->hidden=FALSE;
 		doset(obj, data, msg->ops_AttrList);
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
diff --git Source/WebKit/mui/Api/MorphOS/scriptmanagergroupclass.cpp Source/WebKit/mui/Api/MorphOS/scriptmanagergroupclass.cpp
index 4492611..2db840d 100644
--- Source/WebKit/mui/Api/MorphOS/scriptmanagergroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/scriptmanagergroupclass.cpp
@@ -795,7 +795,7 @@ DEFSMETHOD(ScriptManagerGroup_ScriptsForURL)
 		}
 	}
 
-	return (ULONG) matchingscripts;
+	return (IPTR) matchingscripts;
 }
 
 BEGINMTABLE
diff --git Source/WebKit/mui/Api/MorphOS/scriptmanagerhostlistclass.cpp Source/WebKit/mui/Api/MorphOS/scriptmanagerhostlistclass.cpp
index 6cb4615..f16ec51 100644
--- Source/WebKit/mui/Api/MorphOS/scriptmanagerhostlistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/scriptmanagerhostlistclass.cpp
@@ -65,7 +65,7 @@ DEFDISP
 
 DEFMMETHOD(List_Construct)
 {
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
diff --git Source/WebKit/mui/Api/MorphOS/scriptmanagerlistclass.cpp Source/WebKit/mui/Api/MorphOS/scriptmanagerlistclass.cpp
index 3ec6578..dd27b57 100644
--- Source/WebKit/mui/Api/MorphOS/scriptmanagerlistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/scriptmanagerlistclass.cpp
@@ -67,7 +67,7 @@ DEFDISP
 
 DEFMMETHOD(List_Construct)
 {
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
diff --git Source/WebKit/mui/Api/MorphOS/scriptmanagerwindowclass.cpp Source/WebKit/mui/Api/MorphOS/scriptmanagerwindowclass.cpp
index 8bd1437..2163d37 100644
--- Source/WebKit/mui/Api/MorphOS/scriptmanagerwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/scriptmanagerwindowclass.cpp
@@ -73,7 +73,7 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_ScriptManager;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_ScriptManager;
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/searchbargroupclass.cpp Source/WebKit/mui/Api/MorphOS/searchbargroupclass.cpp
index 45927c9..d647882 100755
--- Source/WebKit/mui/Api/MorphOS/searchbargroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/searchbargroupclass.cpp
@@ -140,7 +140,7 @@ DEFNEW
 
 	if(labels == NULL)
 	{
-		return NULL;
+		return (IPTR)NULL;
 	}
 
 	obj = (Object *) DoSuperNew(cl, obj,
@@ -170,7 +170,7 @@ DEFNEW
 		DoMethod((Object *) getv(pop_search, MUIA_Popstring_String), MUIM_Notify, MUIA_String_Acknowledge, MUIV_EveryTime, obj, 3, MM_OWBWindow_LoadURL, NULL, NULL);
 	}
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 DEFDISP
@@ -236,7 +236,7 @@ DEFGET
 	switch (msg->opg_AttrID)
 	{
 		case MUIA_String_Contents:
-			return GetAttr(MUIA_String_Contents, data->pop_search, (ULONGPTR)msg->opg_Storage);
+			return GetAttr(MUIA_String_Contents, data->pop_search, (IPTR *)msg->opg_Storage);
 
 		case MA_SearchBarGroup_SearchButton:
 			*msg->opg_Storage = data->bt_search != NULL;
diff --git Source/WebKit/mui/Api/MorphOS/searchmanagergroupclass.cpp Source/WebKit/mui/Api/MorphOS/searchmanagergroupclass.cpp
index e8be272..fceb7c1 100644
--- Source/WebKit/mui/Api/MorphOS/searchmanagergroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/searchmanagergroupclass.cpp
@@ -239,7 +239,7 @@ DEFNEW
 		DoMethod(st_shortcut, MUIM_Notify, MUIA_String_Contents, MUIV_EveryTime, obj, 1, MM_SearchManagerGroup_Change);
 	}
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -295,7 +295,7 @@ DEFGET
 				}
 			}
 
-			*msg->opg_Storage = (ULONG)&data->labels;
+			*msg->opg_Storage = (IPTR)&data->labels;
 			return TRUE;
 		}
 
@@ -329,7 +329,7 @@ DEFGET
 				}
 			}
 
-			*msg->opg_Storage = (ULONG)&data->requests;
+			*msg->opg_Storage = (IPTR)&data->requests;
 			return TRUE;
 		}
 
@@ -363,7 +363,7 @@ DEFGET
 				}
 			}
 
-			*msg->opg_Storage = (ULONG)&data->shortcuts;
+			*msg->opg_Storage = (IPTR)&data->shortcuts;
 			return TRUE;
 		}
 	}
diff --git Source/WebKit/mui/Api/MorphOS/searchmanagerlistclass.cpp Source/WebKit/mui/Api/MorphOS/searchmanagerlistclass.cpp
index c5493b5..27f0e37 100644
--- Source/WebKit/mui/Api/MorphOS/searchmanagerlistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/searchmanagerlistclass.cpp
@@ -54,7 +54,7 @@ DEFNEW
 		TAG_MORE, INITTAGS
 	);
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -65,7 +65,7 @@ DEFDISP
 DEFMMETHOD(List_Construct)
 {
 	// Built by caller
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
diff --git Source/WebKit/mui/Api/MorphOS/searchmanagerwindowclass.cpp Source/WebKit/mui/Api/MorphOS/searchmanagerwindowclass.cpp
index b2e4ba3..d385fa8 100644
--- Source/WebKit/mui/Api/MorphOS/searchmanagerwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/searchmanagerwindowclass.cpp
@@ -75,13 +75,13 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_SearchManager;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_SearchManager;
 		}
 		return TRUE;
 
 		case MA_SearchManagerWindow_Group:
 		{
-			*msg->opg_Storage = (ULONG) data->group;
+			*msg->opg_Storage = (IPTR) data->group;
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/seeksliderclass.cpp Source/WebKit/mui/Api/MorphOS/seeksliderclass.cpp
index 6b93d6a..2a0cb54 100644
--- Source/WebKit/mui/Api/MorphOS/seeksliderclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/seeksliderclass.cpp
@@ -25,7 +25,7 @@ DEFNEW
 		TAG_MORE, INITTAGS,
 	End;
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 DEFMMETHOD(Setup)
@@ -42,7 +42,7 @@ DEFMMETHOD(Setup)
 	data->ehnode.ehn_Events =  IDCMP_RAWKEY;
 	data->ehnode.ehn_Priority = 3;
 	data->ehnode.ehn_Flags = MUI_EHF_GUIMODE;
-	DoMethod(_win(obj), MUIM_Window_AddEventHandler, (ULONG)&data->ehnode);
+	DoMethod(_win(obj), MUIM_Window_AddEventHandler, (IPTR)&data->ehnode);
 
 	return TRUE;
 }
@@ -51,7 +51,7 @@ DEFMMETHOD(Cleanup)
 {
 	GETDATA;
 
-	DoMethod(_win(obj), MUIM_Window_RemEventHandler, (ULONG)&data->ehnode);
+	DoMethod(_win(obj), MUIM_Window_RemEventHandler, (IPTR)&data->ehnode);
 
 	return DOSUPER;
 }
@@ -69,7 +69,7 @@ DEFMMETHOD(Numeric_Stringify)
 
 	snprintf(data->buffer, sizeof(data->buffer), "%02d:%02d:%02d", h, m, s);
 
-	return ((ULONG)data->buffer);
+	return ((IPTR)data->buffer);
 }
 
 DEFMMETHOD(AskMinMax)
diff --git Source/WebKit/mui/Api/MorphOS/spacerclass.cpp Source/WebKit/mui/Api/MorphOS/spacerclass.cpp
index 4b84272..7d4adc0 100644
--- Source/WebKit/mui/Api/MorphOS/spacerclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/spacerclass.cpp
@@ -50,7 +50,7 @@ DEFNEW
 		data->brightness_threshold = 255;
 	}
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 #define SPACE_WIDTH  10
diff --git Source/WebKit/mui/Api/MorphOS/splashwindowclass.cpp Source/WebKit/mui/Api/MorphOS/splashwindowclass.cpp
index d27bd79..7f8aad2 100755
--- Source/WebKit/mui/Api/MorphOS/splashwindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/splashwindowclass.cpp
@@ -56,7 +56,7 @@ extern "C"
 
 /* Methods */
 #define MUIM_Process_Launch                 0x80425df7 /* V20 */
-struct  MUIP_Process_Launch                 { ULONG MethodID; };
+struct  MUIP_Process_Launch                 { STACKED ULONG MethodID; };
 
 /* Attributes */
 #define MUIA_Process_AutoLaunch             0x80428855 /* V20 i.. ULONG             */
diff --git Source/WebKit/mui/Api/MorphOS/suggestlistclass.cpp Source/WebKit/mui/Api/MorphOS/suggestlistclass.cpp
index cb6cb9f..73d841e 100755
--- Source/WebKit/mui/Api/MorphOS/suggestlistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/suggestlistclass.cpp
@@ -88,7 +88,7 @@ DEFNEW
 
 		doset(obj, data, msg->ops_AttrList);
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -103,7 +103,7 @@ DEFGET
 	switch (msg->opg_AttrID)
 	{
 		case MA_SuggestList_Opened:
-			*msg->opg_Storage = (ULONG) data->opened;
+			*msg->opg_Storage = (IPTR) data->opened;
             return TRUE;
 	}
 
@@ -182,7 +182,7 @@ DEFMMETHOD(HandleEvent)
 
 DEFMMETHOD(List_Construct)
 {
-	return (ULONG) msg->entry;
+	return (IPTR) msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
diff --git Source/WebKit/mui/Api/MorphOS/suggestpopstringclass.cpp Source/WebKit/mui/Api/MorphOS/suggestpopstringclass.cpp
index 62de3ec..a38c139 100755
--- Source/WebKit/mui/Api/MorphOS/suggestpopstringclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/suggestpopstringclass.cpp
@@ -330,16 +330,16 @@ DEFGET
 			return TRUE;
 
 		case MUIA_Popobject_Object:
-            *msg->opg_Storage = (ULONG) data->lv_entries;
+            *msg->opg_Storage = (IPTR) data->lv_entries;
             return TRUE;
 
 		case MUIA_Popstring_String:
-			*msg->opg_Storage = (ULONG) data->str;
+			*msg->opg_Storage = (IPTR) data->str;
 			return TRUE;
 
 		case MA_OWB_URL:
 		case MUIA_String_Contents:
-			return GetAttr(MUIA_String_Contents, data->str, (ULONGPTR)msg->opg_Storage);
+			return GetAttr(MUIA_String_Contents, data->str, (IPTR *)msg->opg_Storage);
 	}
 
 	return DOSUPER;
diff --git Source/WebKit/mui/Api/MorphOS/tabtransferanimclass.cpp Source/WebKit/mui/Api/MorphOS/tabtransferanimclass.cpp
index 9cfa64a..83c822e 100755
--- Source/WebKit/mui/Api/MorphOS/tabtransferanimclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/tabtransferanimclass.cpp
@@ -65,7 +65,7 @@ STATIC VOID doset(struct Data *data, APTR obj, struct TagItem *taglist)
 
 	while ((tag = NextTagItem(&tstate)) != NULL)
 	{
-		ULONG tag_data = tag->ti_Data;
+		IPTR tag_data = tag->ti_Data;
 
 		switch (tag->ti_Tag)
 		{
@@ -78,7 +78,7 @@ STATIC VOID doset(struct Data *data, APTR obj, struct TagItem *taglist)
 
 						if (data->is_shown && !data->added)
 						{
-							DoMethod(_app(obj), MUIM_Application_AddInputHandler, (ULONG)&data->ihnode);
+							DoMethod(_app(obj), MUIM_Application_AddInputHandler, (IPTR)&data->ihnode);
 							data->added = TRUE;
 						}
 					}
@@ -89,7 +89,7 @@ STATIC VOID doset(struct Data *data, APTR obj, struct TagItem *taglist)
 
 					if (data->is_shown && data->added)
 					{
-						DoMethod(_app(obj), MUIM_Application_RemInputHandler, (ULONG)&data->ihnode);
+						DoMethod(_app(obj), MUIM_Application_RemInputHandler, (IPTR)&data->ihnode);
 						data->added = FALSE;
 					}
 
diff --git Source/WebKit/mui/Api/MorphOS/titleclass.cpp Source/WebKit/mui/Api/MorphOS/titleclass.cpp
index bc73ce3..92f43f4 100755
--- Source/WebKit/mui/Api/MorphOS/titleclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/titleclass.cpp
@@ -71,7 +71,7 @@ DEFNEW
 		data->added = FALSE;
 	}
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFMMETHOD(Hide)
@@ -189,9 +189,9 @@ DEFMMETHOD(DragQuery)
 
 	if (obj != msg->obj && (type == MV_OWB_ObjectType_Tab) /*&& _win(obj) == _win(msg->obj)*/)
 	{
-		ULONG value = 0;
+		IPTR value = 0;
 
-		if(GetAttr(MUIA_Title_Sortable, obj, (ULONGPTR) &value))
+		if(GetAttr(MUIA_Title_Sortable, obj, (IPTR *) &value))
 		{
 			return (MUIV_DragQuery_Accept);
 		}
@@ -223,7 +223,7 @@ DEFMMETHOD(Title_New)
 }
 DEFMMETHOD(Title_CreateNewButton)
 {
-	return (ULONG) NewObject(gettoolbutton_newtabclass(), NULL, TAG_DONE);
+	return (IPTR) NewObject(gettoolbutton_newtabclass(), NULL, TAG_DONE);
 }
 
 #endif
diff --git Source/WebKit/mui/Api/MorphOS/titlelabelclass.cpp Source/WebKit/mui/Api/MorphOS/titlelabelclass.cpp
index 5d8fea5..ee035e6 100755
--- Source/WebKit/mui/Api/MorphOS/titlelabelclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/titlelabelclass.cpp
@@ -141,7 +141,7 @@ DEFNEW
 			DoMethod(favicon, MUIM_Notify, MA_FavIcon_NeedRedraw, MUIV_EveryTime, obj, 1, MM_Title_Redraw);
 		}
 	}
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFDISP
@@ -174,21 +174,21 @@ DEFGET
 		case MA_OWB_URL:
 		{
 			Object *browser = (Object *) muiUserData(obj);
-			*msg->opg_Storage = (ULONG) getv(browser, MA_OWBBrowser_URL);
+			*msg->opg_Storage = (IPTR) getv(browser, MA_OWBBrowser_URL);
 		}
 		return TRUE;
 
 		case MA_OWB_Title:
 		{
 			Object *browser = (Object *) muiUserData(obj);
-			*msg->opg_Storage = (ULONG) getv(browser, MA_OWBBrowser_Title);
+			*msg->opg_Storage = (IPTR) getv(browser, MA_OWBBrowser_Title);
 		}
 		return TRUE;
 
 		case MA_OWB_Browser:
 		{
 			Object *browser = (Object *) muiUserData(obj);
-			*msg->opg_Storage = (ULONG) browser;
+			*msg->opg_Storage = (IPTR) browser;
 		}
 		return TRUE;
 	}
@@ -260,13 +260,13 @@ DEFMMETHOD(ContextMenuBuild)
             End,
         End;
 
-	return (ULONG)data->cmenu;
+	return (IPTR)data->cmenu;
 }
 
 DEFMMETHOD(ContextMenuChoice)
 {
 	Object *browser = (Object *) muiUserData(obj);
-	ULONG udata = muiUserData(msg->item);
+	IPTR udata = muiUserData(msg->item);
 
 	switch(udata)
 	{
@@ -334,9 +334,9 @@ DEFMMETHOD(DragQuery)
 		// Sortable tabs handling
 		if(type == MV_OWB_ObjectType_Tab)
 		{
-			ULONG value = 0;
+			IPTR value = 0;
 
-			if(GetAttr(MUIA_Title_Sortable, _parent(msg->obj), (ULONGPTR) &value))
+			if(GetAttr(MUIA_Title_Sortable, _parent(msg->obj), (IPTR *) &value))
 			{
 				if(value)
 				{
diff --git Source/WebKit/mui/Api/MorphOS/toolbutton_addbookmarkclass.cpp Source/WebKit/mui/Api/MorphOS/toolbutton_addbookmarkclass.cpp
index ec01c07..3f104e3 100755
--- Source/WebKit/mui/Api/MorphOS/toolbutton_addbookmarkclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/toolbutton_addbookmarkclass.cpp
@@ -44,7 +44,7 @@ static void doset(Object * obj, struct Data *data, struct TagItem *tags)
 	{
 		case MA_ToolButton_AddBookmark_IsBookmark:
 		{
-			ULONG isbookmark = tag->ti_Data;
+			IPTR isbookmark = tag->ti_Data;
 			set(obj, MA_ToolButton_Image, isbookmark ? "PROGDIR:resource/addbookmark_added.png" : "PROGDIR:resource/addbookmark_notadded.png");
 		}
 		break;
@@ -69,7 +69,7 @@ DEFNEW
 			TAG_MORE, INITTAGS,
 			TAG_DONE);
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 DEFSET
diff --git Source/WebKit/mui/Api/MorphOS/toolbutton_bookmarksclass.cpp Source/WebKit/mui/Api/MorphOS/toolbutton_bookmarksclass.cpp
index 9f33b32..f7cd7f8 100644
--- Source/WebKit/mui/Api/MorphOS/toolbutton_bookmarksclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/toolbutton_bookmarksclass.cpp
@@ -54,7 +54,7 @@ DEFNEW
 			TAG_MORE, INITTAGS,
 			TAG_DONE);
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 BEGINMTABLE
diff --git Source/WebKit/mui/Api/MorphOS/toolbutton_newtabclass.cpp Source/WebKit/mui/Api/MorphOS/toolbutton_newtabclass.cpp
index f1cf4f0..00ea4c2 100755
--- Source/WebKit/mui/Api/MorphOS/toolbutton_newtabclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/toolbutton_newtabclass.cpp
@@ -48,7 +48,7 @@ DEFNEW
 			TAG_MORE, INITTAGS,
 			TAG_DONE);
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 DEFMMETHOD(DragQuery)
diff --git Source/WebKit/mui/Api/MorphOS/toolbuttonclass.cpp Source/WebKit/mui/Api/MorphOS/toolbuttonclass.cpp
index cd78207..8adae90 100755
--- Source/WebKit/mui/Api/MorphOS/toolbuttonclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/toolbuttonclass.cpp
@@ -304,7 +304,7 @@ DEFNEW
 	switch(background)
 	{
 		case MV_ToolButton_Background_Parent:
-			muibackground = (ULONG) "";
+			muibackground = (IPTR) "";
 			break;
 
 		default:
@@ -333,7 +333,7 @@ DEFNEW
 
 		doset(obj, data, INITTAGS);
 
-		return (ULONG)obj;
+		return (IPTR)obj;
 	}
 
 	return(0);
diff --git Source/WebKit/mui/Api/MorphOS/transferanimclass.cpp Source/WebKit/mui/Api/MorphOS/transferanimclass.cpp
index 53f04b0..22d354d 100755
--- Source/WebKit/mui/Api/MorphOS/transferanimclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/transferanimclass.cpp
@@ -65,7 +65,7 @@ STATIC VOID doset(struct Data *data, APTR obj, struct TagItem *taglist)
 
 	while ((tag = NextTagItem(&tstate)) != NULL)
 	{
-		ULONG tag_data = tag->ti_Data;
+		IPTR tag_data = tag->ti_Data;
 
 		switch (tag->ti_Tag)
 		{
@@ -76,7 +76,7 @@ STATIC VOID doset(struct Data *data, APTR obj, struct TagItem *taglist)
 
 					if (data->is_shown && !data->added)
 					{
-						DoMethod(_app(obj), MUIM_Application_AddInputHandler, (ULONG)&data->ihnode);
+						DoMethod(_app(obj), MUIM_Application_AddInputHandler, (IPTR)&data->ihnode);
 						data->added = TRUE;
 					}
 
@@ -87,7 +87,7 @@ STATIC VOID doset(struct Data *data, APTR obj, struct TagItem *taglist)
 
 					if (data->is_shown && data->added)
 					{
-						DoMethod(_app(obj), MUIM_Application_RemInputHandler, (ULONG)&data->ihnode);
+						DoMethod(_app(obj), MUIM_Application_RemInputHandler, (IPTR)&data->ihnode);
 						data->added = FALSE;
 					}
 
diff --git Source/WebKit/mui/Api/MorphOS/urlprefsgroupclass.cpp Source/WebKit/mui/Api/MorphOS/urlprefsgroupclass.cpp
index 98a046b..79344cb 100644
--- Source/WebKit/mui/Api/MorphOS/urlprefsgroupclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/urlprefsgroupclass.cpp
@@ -45,7 +45,7 @@
 #include "utils.h"
 
 #ifndef get
-#define get(obj,attr,store) GetAttr(attr,obj,(ULONG *)store)
+#define get(obj,attr,store) GetAttr(attr,obj,(IPTR *)store)
 #endif
 
 extern CONST_STRPTR * get_user_agent_strings();
@@ -105,7 +105,7 @@ static void cycles_init(void)
 		STRPTR *current = (STRPTR *)*ptr;
 		while(*current)
 		{
-			*current = (STRPTR)GSI((ULONG)*current);
+			*current = (STRPTR)GSI((IPTR)*current);
 			current++;
 		}
 		ptr++;
@@ -577,11 +577,11 @@ DEFSMETHOD(URLPrefsGroup_UserAgentForURL)
 
 		if(re.match(msg->url) >=0)
 		{
-			return (ULONG) get_user_agent_strings()[un->settings.useragent];
+			return (IPTR) get_user_agent_strings()[un->settings.useragent];
 		}
 	}
 
-	return NULL;
+	return (IPTR)NULL;
 }
 
 DEFSMETHOD(URLPrefsGroup_CookiePolicyForURLAndName)
@@ -627,7 +627,7 @@ DEFSMETHOD(URLPrefsGroup_CookiePolicyForURLAndName)
 		}
 	}
 
-	return (ULONG) policy;
+	return (IPTR) policy;
 }
 
 BEGINMTABLE
diff --git Source/WebKit/mui/Api/MorphOS/urlprefslistclass.cpp Source/WebKit/mui/Api/MorphOS/urlprefslistclass.cpp
index 1a1ba2c..c0f9acd 100644
--- Source/WebKit/mui/Api/MorphOS/urlprefslistclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/urlprefslistclass.cpp
@@ -57,12 +57,12 @@ DEFNEW
 		TAG_MORE, INITTAGS
 	);
 
-	return ((ULONG)obj);
+	return ((IPTR)obj);
 }
 
 DEFMMETHOD(List_Construct)
 {
-	return (ULONG)msg->entry;
+	return (IPTR)msg->entry;
 }
 
 DEFMMETHOD(List_Destruct)
diff --git Source/WebKit/mui/Api/MorphOS/urlprefswindowclass.cpp Source/WebKit/mui/Api/MorphOS/urlprefswindowclass.cpp
index 677cc0d..c742199 100644
--- Source/WebKit/mui/Api/MorphOS/urlprefswindowclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/urlprefswindowclass.cpp
@@ -72,7 +72,7 @@ DEFGET
 	{
 		case MA_OWB_WindowType:
 		{
-			*msg->opg_Storage = (ULONG) MV_OWB_Window_URLPrefs;
+			*msg->opg_Storage = (IPTR) MV_OWB_Window_URLPrefs;
 		}
 		return TRUE;
 	}
diff --git Source/WebKit/mui/Api/MorphOS/urlstringclass.cpp Source/WebKit/mui/Api/MorphOS/urlstringclass.cpp
index 6c74729..4aa3e7a 100755
--- Source/WebKit/mui/Api/MorphOS/urlstringclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/urlstringclass.cpp
@@ -63,8 +63,9 @@ DEFNEW
 			TAG_MORE, INITTAGS,
 			TAG_DONE);
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
+
 /*
 DEFMMETHOD(Hide)
 {
diff --git Source/WebKit/mui/Api/MorphOS/volumesliderclass.cpp Source/WebKit/mui/Api/MorphOS/volumesliderclass.cpp
index 8e14380..d99a533 100644
--- Source/WebKit/mui/Api/MorphOS/volumesliderclass.cpp
+++ Source/WebKit/mui/Api/MorphOS/volumesliderclass.cpp
@@ -24,7 +24,7 @@ DEFNEW
 		TAG_MORE, INITTAGS,
 	End;
 
-	return (ULONG)obj;
+	return (IPTR)obj;
 }
 
 DEFMMETHOD(Numeric_Stringify)
@@ -33,7 +33,7 @@ DEFMMETHOD(Numeric_Stringify)
 
 	snprintf(data->buffer, sizeof(data->buffer), " ");
 
-	return ((ULONG)data->buffer);
+	return ((IPTR)data->buffer);
 }
 
 DEFMMETHOD(AskMinMax)
diff --git Source/cmake/AROS.cmake Source/cmake/AROS.cmake
deleted file mode 100644
index bc9f422..0000000
--- Source/cmake/AROS.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-# this one is important
-SET(CMAKE_SYSTEM_NAME Generic)
-#this one not so much
-SET(CMAKE_SYSTEM_VERSION 1)
-
-# specify the cross compiler
-SET(CMAKE_C_COMPILER i386-aros-gcc)
-SET(CMAKE_CXX_COMPILER i386-aros-g++)
-
-# options
-SET(CMAKE_CXX_FLAGS "")
-SET(CMAKE_CXX_FLAGS_DEBUG "-g -gdwarf-3")
-
-SET(CMAKE_C_FLAGS "")
-SET(CMAKE_C_FLAGS_DEBUG "-g -gdwarf-3")
-
-SET(CMAKE_MODULE_LINKER_FLAGS "")
-
-# where is the target environment
-SET(CMAKE_FIND_ROOT_PATH  "")
-
-# search for programs in the build host directories
-SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-# for libraries and headers in the target directories
-SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
diff --git Source/cmake/WebKitHelpers.cmake Source/cmake/WebKitHelpers.cmake
index 613d911..0ce0431 100644
--- Source/cmake/WebKitHelpers.cmake
+++ Source/cmake/WebKitHelpers.cmake
@@ -10,18 +10,18 @@ macro(WEBKIT_SET_EXTRA_COMPILER_FLAGS _target)
             set(OLD_COMPILE_FLAGS "")
         endif ()
 
-#        get_target_property(TARGET_TYPE ${_target} TYPE)
-#        if (${TARGET_TYPE} STREQUAL "STATIC_LIBRARY") # -fPIC is automatically added to shared libraries
-#            set(OLD_COMPILE_FLAGS "-fPIC ${OLD_COMPILE_FLAGS}")
-#        endif ()
+        if (NOT AROS)
+            get_target_property(TARGET_TYPE ${_target} TYPE)
+            if (${TARGET_TYPE} STREQUAL "STATIC_LIBRARY") # -fPIC is automatically added to shared libraries
+                set(OLD_COMPILE_FLAGS "-fPIC ${OLD_COMPILE_FLAGS}")
+            endif ()
+        endif ()
 
         # Suppress -Wparentheses-equality warning of Clang
         if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
             set(OLD_COMPILE_FLAGS "-Wno-parentheses-equality ${OLD_COMPILE_FLAGS}")
         endif ()
 
-		set(OLD_COMPILE_FLAGS "-march=i686 ${OLD_COMPILE_FLAGS}")
-
         # Enable warnings by default
         if (NOT ${OPTION_IGNORECXX_WARNINGS})
             set(OLD_COMPILE_FLAGS "-Wall -Wextra -Wcast-align -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wundef -Wwrite-strings ${OLD_COMPILE_FLAGS}")
diff --git Tools/OdysseyWebBrowser/main.cpp Tools/OdysseyWebBrowser/main.cpp
index eb27e74..6a2675c 100644
--- Tools/OdysseyWebBrowser/main.cpp
+++ Tools/OdysseyWebBrowser/main.cpp
@@ -306,7 +306,7 @@ Object *create_application(char *url)
 	if(classes_init())
 	{
 	    methodstack_init();
-		obj = (Object *) NewObject(getowbappclass(), NULL, MA_OWBBrowser_URL, (ULONG) url, TAG_DONE);
+		obj = (Object *) NewObject(getowbappclass(), NULL, MA_OWBBrowser_URL, (IPTR) url, TAG_DONE);
 	}
 	else
 	{
